# Programming interface

The interface of manifold learning methods in this packages is partially adopted from the packages StatsBase, MultivariateStats.jl and LightGraphs.jl. You can easily implement additional dimensionality reduction algorithms by implementing the following interface.

## Types and functions

The following functions are currently available from the interface. `AbstractDimensionalityReduction`

is a an abstract type required for all implemented algorithms models.

`ManifoldLearning.AbstractDimensionalityReduction`

— TypeAbstract type for dimensionality reduction methods

For performing the data dimensionality reduction procedure, a model of the data is constructed by calling `fit`

method, and the transformation of the data given the model is done by `transform`

method.

`StatsBase.fit`

— Method`fit(AbstractDimensionalityReduction, X)`

Perform model fitting given the data `X`

`MultivariateStats.transform`

— Method`transfrom(R::AbstractDimensionalityReduction)`

Returns a reduced space representation of the data given the model `R`

inform of the projection matrix (of size $(d, n)$), where `d`

is a dimension of the reduced space and `n`

in the number of the observations. Each column of the projection matrix corresponds to an observation in projected reduced space.

There are auxiliary methods that allow to inspect properties of the constructed model.

`MultivariateStats.outdim`

— Method`outdim(R::AbstractDimensionalityReduction)`

Returns a dimension of the reduced space for the model `R`

`LinearAlgebra.eigvals`

— Method`eigvals(R::AbstractDimensionalityReduction)`

Returns eignevalues of the reduced space reporesentation for the model `R`

`LightGraphs.vertices`

— Method`vertices(R::AbstractDimensionalityReduction)`

Returns vertices of largest connected component in the model `R`

.

`LightGraphs.neighbors`

— Method`neighbors(R::AbstractDimensionalityReduction)`

Returns the number of nearest neighbors used for aproximate local subspace