MCL (Markov Cluster Algorithm)
Markov Cluster Algorithm works by simulating a stochastic (Markov) flow in a weighted graph, where each node is a data point, and the edge weights are defined by the adjacency matrix. ... When the algorithm converges, it produces the new edge weights that define the new connected components of the graph (i.e. the clusters).
Clustering.mcl
— Functionmcl(adj::AbstractMatrix; [kwargs...]) -> MCLResult
Perform MCL (Markov Cluster Algorithm) clustering using $n×n$ adjacency (points similarity) matrix adj
.
Arguments
Keyword arguments to control the MCL algorithm:
add_loops::Bool
(enabled by default): whether the edges of weight 1.0 from the node to itself should be appended to the graphexpansion::Number
(defaults to 2): MCL expansion constantinflation::Number
(defaults to 2): MCL inflation constantsave_final_matrix::Bool
(disabled by default): whether to save the final equilibrium state in themcl_adj
field of the result; could provide useful diagnostic if the method doesn't convergeprune_tol::Number
: pruning thresholddisplay
,maxiter
,tol
: see common options
References
Stijn van Dongen, "Graph clustering by flow simulation", 2001
Clustering.MCLResult
— TypeMCLResult <: ClusteringResult
The output of mcl
function.
Fields
mcl_adj::AbstractMatrix
: the final MCL adjacency matrix (equilibrium state matrix if the algorithm converged), empty ifsave_final_matrix
option is disabledassignments::Vector{Int}
: indices of the points clusters.assignments[i]
is the index of the cluster for the $i$-th point ($0$ if unassigned)counts::Vector{Int}
: the $k$-length vector of cluster sizesnunassigned::Int
: the number of standalone points not assigned to any clusteriterations::Int
: the number of elapsed iterationsrel_Δ::Float64
: the final relative Δconverged::Bool
: whether the method converged