spectral_clustering

Function spectral_clustering 

Source
pub fn spectral_clustering<N, E, Ix>(
    graph: &Graph<N, E, Ix>,
    n_clusters: usize,
    laplacian_type: LaplacianType,
) -> Result<Vec<usize>>
where N: Node + Debug, E: EdgeWeight + Zero + One + PartialOrd + Into<f64> + Copy, Ix: IndexType,
Expand description

Performs spectral clustering on a graph

§Arguments

  • graph - The graph to cluster
  • n_clusters - The number of clusters to create
  • laplacian_type - The type of Laplacian to use

§Returns

  • A vector of cluster labels, one for each node in the graph