fuzzyclust.semisupervised.plot_pairwise_constraints#
- fuzzyclust.semisupervised.plot_pairwise_constraints(X, must_link=None, cannot_link=None, labels=None, centers=None, ax=None, legend=True, violated_only=False, **kwargs)[source]#
Overlay must-link (solid green) and cannot-link (dashed vermilion) pairs on a scatter plot.
- Parameters:
- Xarray_like
ofshape(n_samples, 2) - must_link, cannot_linkarray_like
ofshape(n_pairs, 2),optional - labelsarray_like
ofshape(n_samples,),optional Hard labels for the colors; also used to mark violated constraints (drawn thicker) when given.
- centersarray_like
ofshape(n_clusters, 2),optional - ax
matplotlibAxes,optional - legendbool, default=True
- violated_onlybool, default=False
Draw only the constraints the labels violate.
- **kwargs
Passed to
fuzzyclust.plotting.plot_clusters().
- Xarray_like
- Returns:
- ax
matplotlibAxes
- ax
Examples using fuzzyclust.semisupervised.plot_pairwise_constraints#
Pairwise constraints: must-link, cannot-link and competitive agglomeration
Pairwise constraints: must-link, cannot-link and competitive agglomeration