brainspace.gradient.embedding.PCAMaps¶
-
class
brainspace.gradient.embedding.
PCAMaps
(n_components=10, random_state=None)[source]¶ Principal component analysis.
Parameters: Variables: - lambdas (ndarray, shape (n_components,)) – Explained variance for first principal components in descending order.
- maps (ndarray, shape (n_samples, n_components)) – Projection of input data onto the principal components.
See also
-
__init__
(n_components=10, random_state=None)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
([n_components, random_state])Initialize self. fit
(x)Compute PCA. fit_transform
(x)Compute embedding for x. get_params
([deep])Get parameters for this estimator. set_params
(**params)Set the parameters of this estimator. -
fit
(x)[source]¶ Compute PCA.
Parameters: x (ndarray, shape(n_samples, n_feat)) – Input matrix. Returns: self (object) – Returns self.
-
fit_transform
(x)¶ Compute embedding for x.
Parameters: x (ndarray, shape = (n, n)) – Input matrix. Returns: embedding (ndarray, shape(n, n_components)) – Embedded data.