Flow
sklearn.neighbors._nearest_centroid.NearestCentroid

sklearn.neighbors._nearest_centroid.NearestCentroid

Visibility: public Uploaded 23-03-2023 by Takeaki Sakabe sklearn==1.2.2 numpy>=1.17.3 scipy>=1.3.2 joblib>=1.1.1 threadpoolctl>=2.0.0 0 runs
0 likes downloaded by 0 people 0 issues 0 downvotes , 0 total downloads
  • openml-python python scikit-learn sklearn sklearn_1.2.2
Issue #Downvotes for this reason By


Loading wiki
Help us complete this description Edit
Nearest centroid classifier. Each class is represented by its centroid, with test samples classified to the class with the nearest centroid.

Parameters

metricMetric 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 errordefault: "euclidean"
shrink_thresholdThreshold for shrinking centroids to remove features.default: null

0
Runs

List all runs
Parameter:
Rendering chart
Rendering table