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 ClassesModifier and TypeClassDescriptionstatic classBuilder forSpectralClustering.static classActual implementation of Spectral Clustering. -
Constructor Summary
ConstructorsConstructorDescriptionSpectralClustering(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
Modifier and TypeMethodDescriptionstatic <V,E> SpectralClustering.Builder<V, E> builder()Create a builder.org.jgrapht.alg.interfaces.ClusteringAlgorithm.Clustering<V>
-
Constructor Details
-
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 Details
-
builder
Create a builder.- Type Parameters:
V- the type of nodes in the graphE- the type of edges in the graph- Returns:
- a builder
-
getClustering
- Specified by:
getClusteringin interfaceorg.jgrapht.alg.interfaces.ClusteringAlgorithm<V>
-