fuzzyclust.models.plot_decision_regions#

fuzzyclust.models.plot_decision_regions(clf, X, y=None, ax=None, resolution=200, show_rules=True, proba_class=None, levels=10)[source]#

Decision regions of a two-input classifier, optionally with the rule centers and antecedent ellipses.

The background shows the predicted class (proba_class=None) or the posterior probability \(P(c_j\mid\mathbf{x})\) of the class with index proba_class as filled contours. For a fitted SupervisedFuzzyClassifier the centers of the rules and their \(\pm\sigma_{ij}\) extents are drawn as ellipses (show_rules), so that one sees which rule covers which part of a class.

Parameters:
clffitted classifier with predict (and predict_proba if proba_class is used)
Xarray_like of shape (n_samples, 2)
yarray_like of shape (n_samples,), optional

Class labels of the samples (colored scatter).

axmatplotlib Axes, optional
resolutionint, default=200
show_rulesbool, default=True
proba_classint, optional

Index into clf.classes_ of the class whose posterior is shown.

levelsint, default=10
Returns:
axmatplotlib Axes

Examples using fuzzyclust.models.plot_decision_regions#

Supervised fuzzy clustering: classifier rules that carry class probabilities

Supervised fuzzy clustering: classifier rules that carry class probabilities