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 for
SpectralClustering.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetClusterer(org.apache.commons.math3.ml.clustering.Clusterer<NodeEmbedding<V>> clusterer) Set the underlying clustering algorithm.setK(int k) Set the number of clusters.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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
Set the number of clusters.- Parameters:
k- the number of clusters- Returns:
- the builder
-
apply
-