Reference API

Documentation for Multispati.jl's public interface.

Index

API

Multispati

StatsAPI.fitMethod
fit(MULTISPATI, X, W, Q=I, D=I / size(X, 2); ...)

Perform MULTISPATI over the data given a matrix X. Each column of X is an observation. W is a connectivity matrix where $w_{ij}$ is the connection from j -> i. Q is a symmetric matrix of size n (or LinearAlgebra.UniformScaling(@ref)) and D a symmetric matrix of size d (or LinearAlgebra.UniformScaling(@ref))

Keyword arguments

  • maxoutdim: The output dimension, i.e. dimension of the transformed space (min(d, nc-1))
  • solver: The choice of solver:
    • :eig: uses LinearAlgebra.eigen (default)
    • :eigs: uses Arpack.eigs (always used for sparse data)
  • tol: Convergence tolerance for eigs solver (default 0.0)
  • maxiter: Maximum number of iterations for eigs solver (default 300)

References

S. Dray, et al. "Spatial ordination of vegetation data using a generalization of Wartenberg's multivariate spatial correlation." Journal of vegetation science (2008)

de la Cruz and Holmes. "The duality diagram in data analysis: Examples of modern applications." The annals of applied statistics (2011)

source
StatsAPI.predictMethod
predict(M::MULTISPATI, x::AbstractVecOrMat{<:Real})

Transform the observations x with the model M.

Here, x can be either a vector of length d or a matrix where each column is an observation.

source
MultivariateStats.reconstructMethod
reconstruct(M::MULTISPATI, y::AbstractVecOrMat{<:Real})

Approximately reconstruct the observations y to the original space using the model M.

Here, y can be either a vector of length p or a matrix where each column gives the components for an observation.

source
Multispati.moransIboundsFunction
moransIbounds(M::AbstractMultispati; sparse_approx::Bool=true)

Return the bounds and expected value for Moran's I given the model M in the order $I_{min}$, $I_{max}$, $I_0$

source
Base.sizeMethod
size(M)

Returns a tuple with the dimensions of input (the dimension of the observation space) and output (the dimension of the principal subspace).

source
MultivariateStats.projectionMethod
projection(M::AbstractMultispati)

Returns the projection matrix (of size (d, p)). Each column of the projection matrix corresponds to a eigenvector. The eigenvectors are arranged in ascending order of the eigenvalues.

source

spatialPCA

StatsAPI.fitMethod
fit(SpatialPCA, X, W; ...)

Perform SpatialPCA over the data given a matrix X and W. Each column of X is an observation. W is a connectivity matrix where $w_{ij}$ is the connection from j -> i.

Keyword arguments

  • maxoutdim: The output dimension, i.e. dimension of the transformed space (min(d, nc-1))
  • solver: The choice of solver:
    • :eig: uses LinearAlgebra.eigen (default)
    • :eigs: uses Arpack.eigs (always used for sparse data)
  • tol: Convergence tolerance for eigs solver (default 0.0)
  • maxiter: Maximum number of iterations for eigs solver (default 300)
  • center_sparse: Center sparse matrix X (dense X will always be centered) (default false)

References

T. Jombart, et al. "Revealing cryptic spatial patterns in genetic variability by a new multivariate method." Heredity (2008)

source
StatsAPI.predictMethod
predict(M::SpatialPCA, x::AbstractVecOrMat{<:Real})

Transform the observations x with the SpatialPCA model M.

Here, x can be either a vector of length d or a matrix where each column is an observation.

source
MultivariateStats.reconstructMethod
reconstruct(M::SpatialPCA, y::AbstractVecOrMat{<:Real})

Approximately reconstruct the observations y to the original space using the SpatialPCA model M.

Here, y can be either a vector of length p or a matrix where each column gives the components for an observation.

source
Multispati.varianceMoransIdecompositionFunction
varianceMoransIdecomposition(M::SpatialPCA, X)

Decompose the eigenvalues into a variance and Moran's I contribution given the model M and matrix X which was used for fitting the model.

source