brainspace.gradient.embedding.laplacian_eigenmaps

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

Compute embedding using Laplacian eigenmaps.

Adapted from Scikit-learn to also provide eigenvalues.

Parameters:
  • adj (2D ndarray or sparse matrix) – Affinity matrix.
  • n_components (int, 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.
Returns:

  • v (2D ndarray, shape (n, n_components)) – Eigenvectors of the affinity matrix in same order. Where n is the number of rows of the affinity matrix.
  • w (1D ndarray, shape (n_components,)) – Eigenvalues of the affinity matrix in ascending order.

References

  • Belkin, M. and Niyogi, P. (2003). Laplacian Eigenmaps for dimensionality reduction and data representation. Neural Computation 15(6): 1373-96. doi:10.1162/089976603321780317