spectral_features#
- tangles.separations.finding.spectral_features(laplacian: spmatrix | ndarray, k: int, return_eigenvectors=False) ndarray | tuple[ndarray, ndarray] #
Compute spectral bipartitions directly by computing eigenvectors of the complete graph.
Note: using this function on an disconnected graph might result in errors in eigenvalue computation.
Parameters#
- laplaciansparse.spmatrix or np.ndarray
Laplacian matrix of a graph.
- kint
Number of spectral bipartitions to compute.
Returns#
- np.array
-1/1-matrix containing the spectral bipartitions as columns.