src.geometry.embedding package¶
Submodules¶
src.geometry.embedding.laplacian_embedding module¶
- src.geometry.embedding.laplacian_embedding.laplacian_embedding(mat, ncomp, lap_type='geometric', eigen_solver='dense', drop_first=True, in_place=False, **kwargs)¶
Compute a Laplacian embedding of a graph using either an affinity matrix or a Laplacian matrix.
- Parameters:
mat (AffinityMatrix | LaplacianMatrix) – The input matrix, either an AffinityMatrix or a LaplacianMatrix.
ncomp (int) – Number of components (eigenvectors) to compute.
lap_type (Literal['geometric', 'random_walk', 'symmetric']) – Type of Laplacian to construct if mat is an AffinityMatrix. (default: “geometric”).
eigen_solver (Literal['dense', 'arpack', 'lobpcg', 'amg']) – Eigenvalue solver to use. (default: “dense”).
drop_first (bool) – Whether to drop the first eigenvector (typically trivial). (default: True)
in_place (bool) – Whether to modify the input matrix in place. (default: False)
kwargs (Any) – Additional keyword arguments passed to the eigen decomposition function.
- Returns:
A tuple of eigenvalues and eigenvectors.
- Raises:
ValueError – If the input matrix type is not recognized.
- Return type:
Tuple[DenseArray, DenseArray]
src.geometry.embedding.ltsa module¶
Module contents¶
- src.geometry.embedding.laplacian_embedding(mat, ncomp, lap_type='geometric', eigen_solver='dense', drop_first=True, in_place=False, **kwargs)¶
Compute a Laplacian embedding of a graph using either an affinity matrix or a Laplacian matrix.
- Parameters:
mat (AffinityMatrix | LaplacianMatrix) – The input matrix, either an AffinityMatrix or a LaplacianMatrix.
ncomp (int) – Number of components (eigenvectors) to compute.
lap_type (Literal['geometric', 'random_walk', 'symmetric']) – Type of Laplacian to construct if mat is an AffinityMatrix. (default: “geometric”).
eigen_solver (Literal['dense', 'arpack', 'lobpcg', 'amg']) – Eigenvalue solver to use. (default: “dense”).
drop_first (bool) – Whether to drop the first eigenvector (typically trivial). (default: True)
in_place (bool) – Whether to modify the input matrix in place. (default: False)
kwargs (Any) – Additional keyword arguments passed to the eigen decomposition function.
- Returns:
A tuple of eigenvalues and eigenvectors.
- Raises:
ValueError – If the input matrix type is not recognized.
- Return type:
Tuple[DenseArray, DenseArray]