hypertools.reduce

hypertools.reduce(*args, **kwargs)[source]

Reduces dimensionality of an array, or list of arrays

Parameters:

x : Numpy array or list of arrays

Dimensionality reduction using PCA is performed on this array.

reduce : str or dict

Decomposition/manifold learning model to use. Models supported: PCA, IncrementalPCA, SparsePCA, MiniBatchSparsePCA, KernelPCA, FastICA, FactorAnalysis, TruncatedSVD, DictionaryLearning, MiniBatchDictionaryLearning, TSNE, Isomap, SpectralEmbedding, LocallyLinearEmbedding, and MDS. Can be passed as a string, but for finer control of the model parameters, pass as a dictionary, e.g. reduce={‘model’ : ‘PCA’, ‘params’ : {‘whiten’ : True}}. See scikit-learn specific model docs for details on parameters supported for each model.

ndims : int

Number of dimensions to reduce

model : None

Deprecated argument. Please use reduce.

model_params : None

Deprecated argument. Please use reduce.

align : None

Deprecated argument. Please use new analyze function to perform combinations of transformations

normalize : None

Deprecated argument. Please use new analyze function to perform combinations of transformations

Returns:

x_reduced : Numpy array or list of arrays

The reduced data with ndims dimensionality is returned. If the input is a list, a list is returned.