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 indexproba_classas filled contours. For a fittedSupervisedFuzzyClassifierthe 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:
- clf
fittedclassifierwithpredict(andpredict_probaifproba_classisused) - Xarray_like
ofshape(n_samples, 2) - yarray_like
ofshape(n_samples,),optional Class labels of the samples (colored scatter).
- ax
matplotlibAxes,optional - resolution
int, default=200 - show_rulesbool, default=True
- proba_class
int,optional Index into
clf.classes_of the class whose posterior is shown.- levels
int, default=10
- clf
- Returns:
- ax
matplotlibAxes
- ax
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