fuzzyclust.graph.plot_mst#

fuzzyclust.graph.plot_mst(X, model, ax=None, labels=None, show_cuts=True, legend=True, **kwargs)[source]#

Draw the minimal spanning tree of a fitted MSTClustering.

Tree edges are gray; edges removed by the threshold/inconsistency phase are drawn in vermilion, edges removed by the volume-based splitting in orange (both dashed). Points are colored by labels (default: the tree partition model.tree_labels_).

Parameters:
Xarray_like of shape (n_samples, 2)
modelfitted MSTClustering
axmatplotlib Axes, optional
labelsarray_like of shape (n_samples,), optional
show_cutsbool, default=True
legendbool, default=True
**kwargs

Passed to fuzzyclust.plotting.plot_clusters().

Returns:
axmatplotlib Axes

Examples using fuzzyclust.graph.plot_mst#

Minimal spanning tree clustering: cutting, splitting, and Gath–Geva refinement

Minimal spanning tree clustering: cutting, splitting, and Gath–Geva refinement

Inconsistent edges: Zahn’s criteria and the neighborhood depth

Inconsistent edges: Zahn's criteria and the neighborhood depth

Number of clusters: volume-based validity and fuzzy cluster similarity

Number of clusters: volume-based validity and fuzzy cluster similarity