Skip to content

SVD and complexity

Abstract

When generating networks, in particular when using randomdraws following nullmodel, there is a chance that some species will have no interactions. In some cases, it may be relevant to identify and remove these species. The methods presented in this page offer a way to do this.

Detection of disconnected species

# SpeciesInteractionNetworks.tsvdFunction.

tsvd(N::SpeciesInteractionNetwork, r::Integer)

Returns the left and right subspaces for a given ecological network, applying a truncation of the SVD at rank r. Note that if r is higher than the rank of the network, it will be scaled appropriately.

References

Dalla Riva and Stouffer (2016)

source

# SpeciesInteractionNetworks.rdpgFunction.

rdpg(N::SpeciesInteractionNetwork, r::Integer)

Returns a quantitative network predicted using a random dot-product graph on the tsvd of the network at rank r.

RDPG has been shown to be predictive of food web structure even in the context of transfer learning (Strydom et al., 2022).

References

Dalla Riva and Stouffer (2016)

Strydom, Bouskila, Banville, Barros, Caron, Farrell, Fortin, Hemming, Mercier, Pollock, Runghen, Dalla Riva and Poisot (2022)

source

rdpg(N::SpeciesInteractionNetwork, r::Integer, threshold::T) where {T <: AbstractFloat}

Returns a binary network predicted using a random dot-product graph on the tsvd of the network at rank r, where interactions with a score above threshold are true.

This approach to RDPG has been shown to be highly predictive under strong data sparsity (Poisot et al., 2023).

References

Dalla Riva and Stouffer (2016)

Poisot, Ouellet, Mollentze, Farrell, Becker, Brierley, Albery, Gibb, Seifert and Carlson (2023)

source

# SpeciesInteractionNetworks.complexityFunction.

complexity(N::SpeciesInteractionNetwork)

Returns the SVD complexity of a network, defined as the Pielou entropy of its singular values. Note that only the singular values up to the rank of the network are returned.

References

Strydom, Dalla Riva and Poisot (2021)

source