spectral-clustering-0.2.1.4: Library for spectral clustering.

Safe HaskellNone
LanguageHaskell2010

Math.Clustering.Spectral.Eigen.AdjacencyMatrix

Synopsis

Documentation

spectralClusterKNorm :: Int -> Int -> AdjacencyMatrix -> LabelVector Source #

Returns the clustering of the eigenvectors with the second smallest eigenvalues of the symmetric normalized Laplacian L. Computes real symmetric part of L, so ensure the input is real and symmetric. Diagonal should be 0s for adjacency matrix. Clusters the eigenvector using kmeans into k groups.

spectralClusterNorm :: AdjacencyMatrix -> LabelVector Source #

Returns the clustering of the eigenvectors with the second smallest eigenvalues of the symmetric normalized Laplacian L. Computes real symmetric part of L, so ensure the input is real and symmetric. Diagonal should be 0s for adjacency matrix. Clusters the eigenvector by sign.

spectralNorm :: Int -> Int -> AdjacencyMatrix -> SparseMatrixXd Source #

Returns the eigenvector with the second smallest eigenvalue (or N start) and E on of the symmetric normalized Laplacian L. Computes real symmetric part of L, so ensure the input is real and symmetric. Diagonal should be 0s for adjacency matrix. Uses I + Lnorm instead of I - Lnorm to find second largest singular value instead of second smallest for Lnorm.

getDegreeMatrix :: AdjacencyMatrix -> SparseMatrixXd Source #

Obtain the degree matrix. Faster for columns.

secondLeft :: Int -> Int -> SparseMatrixXd -> SparseMatrixXd Source #

Obtain the second largest value singular vector (or Nth) and E on of a sparse matrix.