Package org.nlpub.watset.graph
Class SpectralClustering.Builder<V,E>
- java.lang.Object
-
- org.nlpub.watset.graph.SpectralClustering.Builder<V,E>
-
- Type Parameters:
V- the type of nodes in the graphE- the type of edges in the graph
- All Implemented Interfaces:
Function<org.jgrapht.Graph<V,E>,SpectralClustering<V,E>>,ClusteringAlgorithmBuilder<V,E,SpectralClustering<V,E>>
- Enclosing class:
- SpectralClustering<V,E>
public static class SpectralClustering.Builder<V,E> extends Object implements ClusteringAlgorithmBuilder<V,E,SpectralClustering<V,E>>
Builder forSpectralClustering.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpectralClustering<V,E>apply(org.jgrapht.Graph<V,E> graph)SpectralClustering.Builder<V,E>setClusterer(org.apache.commons.math3.ml.clustering.Clusterer<NodeEmbedding<V>> clusterer)Set the underlying clustering algorithm.SpectralClustering.Builder<V,E>setK(int k)Set the number of clusters.
-
-
-
Method Detail
-
setClusterer
public SpectralClustering.Builder<V,E> setClusterer(org.apache.commons.math3.ml.clustering.Clusterer<NodeEmbedding<V>> clusterer)
Set the underlying clustering algorithm.- Parameters:
clusterer- the clustering algorithm- Returns:
- the builder
-
setK
public SpectralClustering.Builder<V,E> setK(int k)
Set the number of clusters.- Parameters:
k- the number of clusters- Returns:
- the builder
-
-