Package org.nlpub.watset.graph
Class SpectralClustering<V,E>
- java.lang.Object
-
- org.nlpub.watset.graph.SpectralClustering<V,E>
-
- Type Parameters:
V- the type of nodes in the graphE- the type of edges in the graph
- All Implemented Interfaces:
org.jgrapht.alg.interfaces.ClusteringAlgorithm<V>
public class SpectralClustering<V,E> extends Object implements org.jgrapht.alg.interfaces.ClusteringAlgorithm<V>
Spectral Clustering performs clustering of the graph's Spectral Embedding.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSpectralClustering.Builder<V,E>Builder forSpectralClustering.static classSpectralClustering.Implementation<V,E>Actual implementation of Spectral Clustering.
-
Constructor Summary
Constructors Constructor Description SpectralClustering(org.jgrapht.Graph<V,E> graph, org.apache.commons.math3.ml.clustering.Clusterer<NodeEmbedding<V>> clusterer, int k)Create an instance of the Spectral Clustering algorithm.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <V,E>
SpectralClustering.Builder<V,E>builder()Create a builder.org.jgrapht.alg.interfaces.ClusteringAlgorithm.Clustering<V>getClustering()
-
-
-
Constructor Detail
-
SpectralClustering
public SpectralClustering(org.jgrapht.Graph<V,E> graph, org.apache.commons.math3.ml.clustering.Clusterer<NodeEmbedding<V>> clusterer, int k)
Create an instance of the Spectral Clustering algorithm.- Parameters:
graph- the graphclusterer- the clustering algorithmk- the number of clusters
-
-
Method Detail
-
builder
public static <V,E> SpectralClustering.Builder<V,E> builder()
Create a builder.- Type Parameters:
V- the type of nodes in the graphE- the type of edges in the graph- Returns:
- a builder
-
-