Nearest centroid classifier

Uses your system voice; voice and rate in settings.

Snapshot

≈ 2 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

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.

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}\| .

Text derived from https://en.wikipedia.org/w/index.php?oldid=1329283882 under CC BY-SA 4.0; modifications have been made.

Provenance

snapshot enwiki-001329283882 · captured 1766619279.0 · version history

Cite this page as: encyclopegia.org, “Nearest centroid classifier”, snapshot enwiki-001329283882. https://encyclopegia.org/a/nearest-centroid-classifier

Sources cited in this revision

1 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.