e01.org

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. 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. An extended version of the nearest centroid classifier has found applications in the medical domain, specifically classification of tumors. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

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. 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. An extended version of the nearest centroid classifier has found applications in the medical domain, specifically classification of tumors. ===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} . ===Prediction=== The class assigned to an observation \vec{x} is \hat{y} = {\arg\min}_{\ell \in \mathbf{Y}} \|\vec{\mu}_\ell - \vec{x}\| .

References

  1. ^ Manning, Christopher; Raghavan, Prabhakar; Schütze, Hinrich (2008). "Vector space classification". Introduction to Information Retrieval . Cambridge University Press. Wikipedia revision 1329283882, retrieved 2026-11-18 · 1794956400.0
  2. ^ Tibshirani, Robert ; Hastie, Trevor ; Narasimhan, Balasubramanian; Chu, Gilbert (2002). "Diagnosis of multiple cancer types by shrunken centroids of gene expression" . Proceedings of the National Academy of Sciences . 99 (10): 6567– 6572. Bibcode : 2002PNAS...99.6567T . doi : 10.1073/pnas.082099299 . PMC 124443 . PMID 12011421 . Wikipedia revision 1329283882, retrieved 2026-11-18 · 1794956400.0
source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Nearest centroid classifier". 1766619279. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1329283882

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·