Nearest centroid classifier
In machine learning, a nearest centroid classifier or nearest prototype classifier is a classification model that assigns to observations the label of the class of training samples whose mean (centroid) is closest to the observation.[src] When applied to text classification using word vectors containing tf*idf weights to represent documents, the nearest centroid classifier is known as the Rocchio classifier because of its similarity to the Rocchio algorithm for relevance feedback.[src] An extended version of the nearest centroid classifier has found applications in the medical domain, specifically classification of tumors.[src]
In machine learning, a nearest centroid classifier or nearest prototype classifier is a classification model that assigns to observations the label of the class of training samples whose mean (centroid) is closest to the observation.[src] When applied to text classification using word vectors containing tf*idf weights to represent documents, the nearest centroid classifier is known as the Rocchio classifier because of its similarity to the Rocchio algorithm for relevance feedback.[src] An extended version of the nearest centroid classifier has found applications in the medical domain, specifically classification of tumors.[src] ===Training=== Given labeled training samples \textstyle\{(\vec{x}_1, y_1), \dots, (\vec{x}_n, y_n)\} with class labels y_i \in \mathbf{Y} , compute the per-class centroids \textstyle\vec{\mu}_\ell = \frac{1} \underset{i \in C_\ell}{\sum} \vec{x}_i where C_\ell is the set of indices of samples belonging to class \ell \in \mathbf{Y} .[src] ===Prediction=== The class assigned to an observation \vec{x} is \hat{y} = {\arg\min}_{\ell \in \mathbf{Y}} \|\vec{\mu}_\ell - \vec{x}\| .[src]
8 sentences · 8 cited inline · 2 references stored
References
- Vector space classification · retrieved 2026-11-17 · rev 1329283882
Cite this reference
MLA "Vector space classification." Manning, Christopher; Raghavan, Prabhakar; Schütze, Hinrich (2008). 2026-11-17. http://nlp.stanford.edu/IR-book/html/htmledition/rocchio-classification-1.html. Accessed 27 November 2026.
Chicago "Vector space classification." Manning, Christopher; Raghavan, Prabhakar; Schütze, Hinrich (2008). 2026-11-17. http://nlp.stanford.edu/IR-book/html/htmledition/rocchio-classification-1.html.
APA Manning, Christopher; Raghavan, Prabhakar; Schütze, Hinrich (2008). (2026). Vector space classification. Retrieved November 27, 2026, from http://nlp.stanford.edu/IR-book/html/htmledition/rocchio-classification-1.html
- Diagnosis of multiple cancer types by shrunken centroids of gene expression · retrieved 2026-11-17 · rev 1329283882
Cite this reference
MLA "Diagnosis of multiple cancer types by shrunken centroids of gene expression." Tibshirani, Robert ; Hastie, Trevor ; Narasimhan, Balasubramanian; Chu, Gilbert (2002). 2026-11-17. https://en.wikipedia.org/wiki/Robert_Tibshirani. Accessed 27 November 2026.
Chicago "Diagnosis of multiple cancer types by shrunken centroids of gene expression." Tibshirani, Robert ; Hastie, Trevor ; Narasimhan, Balasubramanian; Chu, Gilbert (2002). 2026-11-17. https://en.wikipedia.org/wiki/Robert_Tibshirani.
APA Tibshirani, Robert ; Hastie, Trevor ; Narasimhan, Balasubramanian; Chu, Gilbert (2002). (2026). Diagnosis of multiple cancer types by shrunken centroids of gene expression. Retrieved November 27, 2026, from https://en.wikipedia.org/wiki/Robert_Tibshirani
Cite this article
MLA
"Nearest centroid classifier." encyclopegia.org, 2025, https://encyclopegia.org/wiki/nearest-centroid-classifier. Accessed 27 November 2026.
Chicago
"Nearest centroid classifier." encyclopegia.org. Accessed November 27, 2026. https://encyclopegia.org/wiki/nearest-centroid-classifier.
APA
encyclopegia.org. (2025). Nearest centroid classifier. Retrieved November 27, 2026, from https://encyclopegia.org/wiki/nearest-centroid-classifier
Accessed November 27, 2026 · CC BY-SA 4.0 · citation page · JSON