.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_classifier.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_classifier.py: ======================================= Plotting Fuzzy Decision Tree Classifier ======================================= An example plot of :class:`FuzzyDecisionTreeClassifier` .. GENERATED FROM PYTHON SOURCE LINES 8-26 .. image:: /auto_examples/images/sphx_glr_plot_classifier_001.png :alt: Fuzzy Tree Classification on blobs :class: sphx-glr-single-img .. code-block:: default from matplotlib import pyplot as plt from mlxtend.plotting import plot_decision_regions from sklearn.datasets import make_blobs from fuzzytree import FuzzyDecisionTreeClassifier X, y = make_blobs(n_samples=300, n_features=2, centers=[[10, 0], [20, 30], [40, 5]], cluster_std=[7, 11, 13], random_state=42) clf = FuzzyDecisionTreeClassifier().fit(X, y) plot_decision_regions(X=X, y=y, clf=clf, legend=2) plt.title("Fuzzy Tree Classification on blobs") plt.xlabel("Feature 1") plt.ylabel("Feature 2") plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 10.205 seconds) .. _sphx_glr_download_auto_examples_plot_classifier.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_classifier.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_classifier.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_