fuzzyclust.models.make_banded_classes#
- fuzzyclust.models.make_banded_classes(n_samples=450, random_state=None)[source]#
Three classes separated by thresholds on two features, plus one irrelevant feature.
Class 0 lies at \(x_1\approx-2\) with a wide spread in \(x_2\); classes 1 and 2 share \(x_1\approx0.5\) and are separated along \(x_2\) (centers \(1.8\) and \(-1.0\)). The third feature is standard normal noise unrelated to the class. The class boundaries are thus axis-parallel but sit at positions that neither equal-width nor equal-frequency binning hits, and one feature is a “don’t care” variable – the situation in which a supervised discretization pays off (Abonyi 2010).
Examples
>>> from fuzzyclust.models import make_banded_classes >>> X, y = make_banded_classes(n_samples=90, random_state=0) >>> X.shape, sorted(set(y.tolist())) ((90, 3), [0, 1, 2])
Examples using fuzzyclust.models.make_banded_classes#
Supervised fuzzy partitions as a priori discretization for decision trees
Supervised fuzzy partitions as a priori discretization for decision trees