fuzzyclust.plotting#
Matplotlib helpers for inspecting clustering results.
All functions accept an optional ax and return the Axes
they drew on; they never call plt.show(). Colors follow a fixed,
color-blind-safe categorical order (Okabe–Ito palette); cluster \(i\) always
gets color PALETTE[i % len(PALETTE)].
Scatter, contour, ellipse and validity plots shared by the examples.
Functions#
|
Scatter plot of 2-D data colored by (hard) cluster label with prototypes. |
|
Contour map of the maximal membership \(\max_i \mu_i(\mathbf{x})\) over the plane. |
|
Draw the \(n_\text{std}\)-sigma ellipses of (fuzzy) covariance matrices. |
|
Plot validity indices versus the number of clusters. |
|
Objective \(J\) versus iteration for one or several fitted estimators. |
|
Membership degrees \(\mu_{ik}\) of every cluster along the sample index. |
Constants#
Okabe–Ito color-blind-safe palette, fixed assignment order. |