brainspace.gradient.embedding.LaplacianEigenmaps

class brainspace.gradient.embedding.LaplacianEigenmaps(n_components=10, norm_laplacian=True, random_state=None)[source]

Laplacian eigenmaps.

Parameters:
  • n_components (int or None, optional) – Number of eigenvectors. Default is 10.
  • norm_laplacian (bool, optional) – If True, use normalized Laplacian. Default is True.
  • random_state (int or None, optional) – Random state. Default is None.
Variables:
  • lambdas (ndarray, shape (n_components,)) – Eigenvalues of the affinity matrix in ascending order.
  • maps (ndarray, shape (n, n_components)) – Eigenvectors of the affinity matrix in same order. Where n is the number of rows of the affinity matrix.
__init__(n_components=10, norm_laplacian=True, random_state=None)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([n_components, norm_laplacian, …]) Initialize self.
fit(affinity) Compute the Laplacian maps.
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(affinity)[source]

Compute the Laplacian maps.

Parameters:affinity (ndarray or sparse matrix, shape = (n, n)) – Affinity 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.