Package org.nlpub.watset.graph
Class MarkovClustering<V,E>
- java.lang.Object
-
- org.nlpub.watset.graph.MarkovClustering<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 MarkovClustering<V,E> extends Object implements org.jgrapht.alg.interfaces.ClusteringAlgorithm<V>
Naïve implementation of the Markov Clustering (MCL) algorithm.This implementation assumes processing of relatively small graphs due to the lack of pruning optimizations.
- See Also:
- van Dongen (2000), van Dongen (2008)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMarkovClustering.Builder<V,E>Builder forMarkovClustering.protected static classMarkovClustering.Implementation<V,E>Actual implementation of Markov Clustering.static classMarkovClustering.InflateVisitorVisitor that raises each element to the power ofr.static classMarkovClustering.NormalizeVisitorVisitor that normalizes columns.
-
Field Summary
Fields Modifier and Type Field Description protected org.jgrapht.alg.interfaces.ClusteringAlgorithm.Clustering<V>clusteringThe cached clustering result.protected inteThe expansion parameter.protected org.jgrapht.Graph<V,E>graphThe graph.protected intiterationsThe maximal number of iterations.protected doublerThe inflation parameter.
-
Constructor Summary
Constructors Constructor Description MarkovClustering(org.jgrapht.Graph<V,E> graph, int e, double r, int iterations)Create an instance of the Markov Clustering algorithm.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <V,E>
MarkovClustering.Builder<V,E>builder()Create a builder.org.jgrapht.alg.interfaces.ClusteringAlgorithm.Clustering<V>getClustering()
-
-
-
Field Detail
-
e
protected final int e
The expansion parameter.
-
r
protected final double r
The inflation parameter.
-
iterations
protected final int iterations
The maximal number of iterations.
-
clustering
protected org.jgrapht.alg.interfaces.ClusteringAlgorithm.Clustering<V> clustering
The cached clustering result.
-
-
Method Detail
-
builder
public static <V,E> MarkovClustering.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
-
-