Package org.nlpub.watset.graph
Class MaxMax<V,E>
- java.lang.Object
-
- org.nlpub.watset.graph.MaxMax<V,E>
-
- Type Parameters:
V- the type of nodes in the graphE- the type of edges in the graph
- All Implemented Interfaces:
Clustering<V>
public class MaxMax<V,E> extends Object implements Clustering<V>
Implementation of the MaxMax soft clustering algorithm.- See Also:
- Hope & Keller (CICLing 2013)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfit()Run the algorithm to induce the parameters of the clusters.Collection<Collection<V>>getClusters()Return a collection of clusters, each cluster is a collection of objects.org.jgrapht.Graph<V,org.jgrapht.graph.DefaultEdge>getDigraph()Return the directed graph representation of the input graph.Map<V,Set<V>>getMaximals()Return the map of nodes to their maximal affinity nodes.Map<V,Boolean>getRoots()Return the map of root and non-root nodes.static <V,E>
Function<org.jgrapht.Graph<V,E>,Clustering<V>>provider()A factory function that sets up the algorithm for the given graph.
-
-
-
Method Detail
-
provider
public static <V,E> Function<org.jgrapht.Graph<V,E>,Clustering<V>> provider()
A factory function that sets up the algorithm for the given graph.- Type Parameters:
V- the type of nodes in the graphE- the type of edges in the graph- Returns:
- a factory function that sets up the algorithm for the given graph
-
fit
public void fit()
Description copied from interface:ClusteringRun the algorithm to induce the parameters of the clusters.- Specified by:
fitin interfaceClustering<V>
-
getClusters
public Collection<Collection<V>> getClusters()
Description copied from interface:ClusteringReturn a collection of clusters, each cluster is a collection of objects. Usually this method is called after theClustering.fit()method.- Specified by:
getClustersin interfaceClustering<V>- Returns:
- clusters
-
getDigraph
public org.jgrapht.Graph<V,org.jgrapht.graph.DefaultEdge> getDigraph()
Return the directed graph representation of the input graph.- Returns:
- a directed graph
-
getMaximals
public Map<V,Set<V>> getMaximals()
Return the map of nodes to their maximal affinity nodes.- Returns:
- a map of maximal affinities
-
-