API Reference
Current
Table of the package models and corresponding function names used by these models.
| Function \ Model | CCA | WHT | ICA | LDA | FA | PPCA | PCA | KPCA | MDS |
|---|---|---|---|---|---|---|---|---|---|
| fit | x | x | x | x | x | x | x | x | x |
| transform | x | x | x | x | x | x | x | x | x |
| predict | x | ||||||||
| indim | x | x | x | x | x | x | x | x | |
| outdim | x | x | x | x | x | x | x | x | x |
| mean | x | x | x | x | x | x | x | ? | |
| var | x | x | ? | ? | ? | ||||
| cov | x | ? | |||||||
| cor | x | ||||||||
| projection | x | x | x | x | x | x | |||
| reconstruct | x | x | x | x | |||||
| loadings | ? | ? | x | x | ? | ? | ? | ||
| eigvals | ? | ? | ? | ? | x | ||||
| eigvecs | ? | ? | ? | ? | ? | ||||
| length | |||||||||
| size |
Note: ? refers to a possible implementation that is missing or called differently.
New
| Function \ Model | WHT | CCA | LDA | MC-LDA | SS-LDA | ICA | FA | PPCA | PCA | KPCA | MDS |
|---|---|---|---|---|---|---|---|---|---|---|---|
| fit | x | x | x | x | x | x | x | x | x | x | x |
| transform | x | - | - | - | - | - | x | x | - | - | - |
| predict | + | x | + | + | + | + | + | + | |||
| indim | - | - | - | - | x | x | - | - | - | ||
| outdim | - | - | - | - | - | x | x | - | - | - | |
| mean | x | x | x | x | x | x | x | x | |||
| var | x | x | x | ? | |||||||
| cov | x | x | |||||||||
| cor | + | ||||||||||
| projection | ? | x | x | x | x | x | x | x | x | ||
| reconstruct | x | x | x | x | |||||||
| loadings | x | x | x | + | |||||||
| eigvals | + | ? | ? | x | x | x | |||||
| eigvecs | ? | ? | x | + | + | ||||||
| length | + | + | + | + | |||||||
| size | + | + | + | + | + | x | + | + | |||
- StatsBase.AbstractDataTransform
- Whitening
- Interface: fit, transform
- New: length, mean, size
- Whitening
- StatsBase.RegressionModel
- Interface: fit, predict
- LinearDiscriminant
- Functions: coef, dof, weights, evaluate, length
- MulticlassLDA
- Functions: size, mean, projection, length
- SubspaceLDA
- Functions: size, mean, projection, length, eigvals
- CCA
- Functions: size, mean, projection, predict, cor
- Subtypes:
- AbstractDimensionalityReduction
- Interface: projection, var, reconstruct, loadings
- Interface: projection == weights
- Subtypes:
- LinearDimensionalityReduction
- Methods: ICA, PCA
- NonlinearDimensionalityReduction
- Methods: KPCA, MDS
- Functions: modelmatrix(X),
- Methods: KPCA, MDS
- LatentVariableModel or LatentVariableDimensionalityReduction
- Methods: FA, PPCA
- Functions: cov
- Methods: FA, PPCA
- LinearDimensionalityReduction
- AbstractDimensionalityReduction
Generic Interface
The models above share a type hierarchy, and the following methods are defined generically on its abstract types.
MultivariateStats.projection — Method
projection(model::AbstractDimensionalityReduction)Return the projection matrix of the model.
MultivariateStats.reconstruct — Method
reconstruct(model::AbstractDimensionalityReduction, y)Return the model response (a.k.a. the dependent variable).
MultivariateStats.loadings — Method
loadings(model::LinearDimensionalityReduction)Return the model loadings (a.k.a. eigenvectors scaled up by the variances).
Internals
These are not part of the public API and may change without a breaking release.
MultivariateStats.calcscattermat — Method
calcscattermat([covestimator::CovarianceEstimator], Z::DenseMatrix)Calculate the scatter matrix of centered data Z based on a covariance matrix calculated using covariance estimator covestimator (by default, SimpleCovariance()).
MultivariateStats.toindices — Method
toindices(labels::AbstractVector)Generate integer indices for the collection labels. Generated indices will be in 1:nc range where nc is a number of classes in the labels collection.
MultivariateStats.L2distance — Method
L2distance(X)Calculate a symmetric Euclidean (L2) distance matrix.