

.. _example_neighbors_plot_nearest_centroid.py:


===============================
Nearest Centroid Classification
===============================

Sample usage of Nearest Centroid classification.
It will plot the decision boundaries for each class.



.. rst-class:: horizontal





**Python source code:** :download:`plot_nearest_centroid.py <plot_nearest_centroid.py>`

.. literalinclude:: plot_nearest_centroid.py
    :lines: 9-

**Total running time of the example:**    0 seconds
    