Nearest centroid classifier.
Each class is represented by its centroid, with test samples classified to
the class with the nearest centroid.
Parameters
metric
Metric to use for distance computation. See the documentation of
`scipy.spatial.distance
`_ and
the metrics listed in
:class:`~sklearn.metrics.pairwise.distance_metrics` for valid metric
values. Note that "wminkowski", "seuclidean" and "mahalanobis" are not
supported
The centroids for the samples corresponding to each class is
the point from which the sum of the distances (according to the metric)
of all samples that belong to that particular class are minimized
If the `"manhattan"` metric is provided, this centroid is the median
and for all other metrics, the centroid is now set to be the mean
.. versionchanged:: 0.19
`metric='precomputed'` was deprecated and now raises an error
default: "euclidean"
shrink_threshold
Threshold for shrinking centroids to remove features.