Artificial intelligence · Unsupervised learning and clustering

Nearest Centroid Classifier

In Spanish: Clasificador de Centroides Más Cercanos
See in the galaxyCopy link
Updated: 09/11/2026Reading: 2 min

Description

The Nearest Centroid Classifier is a classification algorithm that assigns a class to a sample based on the distance to the centroids of the previously defined classes. This method is based on the idea that data from the same class tend to cluster around a central point, known as a centroid. For each class, the centroid is calculated, which is the average of all samples belonging to that class. When a new sample is presented, the classifier calculates the distance between this sample and each of the class centroids. The class whose centroid is closest to the sample is assigned as the sample's class. This approach is intuitive and easy to implement, making it a popular option in the field of machine learning. Additionally, its simplicity allows it to be scalable and efficient, especially in large datasets, making it suitable for applications in various areas of data analysis. However, its performance can be affected by the presence of noise in the data and the choice of the distance metric used, with Euclidean distance being the most common. In summary, the Nearest Centroid Classifier is a valuable tool in the arsenal of classification techniques, especially in contexts where interpretability and efficiency are crucial.

Glosarix on your device

Install
×
Enable Notifications Ok No