[Sklearn] Data classification prediction based on the most central classifier algorithm (Excel can directly replace the data)

[Sklearn] Data classification prediction based on the most central classifier algorithm (Excel can directly replace the data)

1. Model Principle

The Nearest Centroid Classifier is also known as the Nearest Shrunken Centroid Classifier. It is a class center-based classification method for linearly separable problems. The basic idea is to average the sample features of each category to obtain the center point of each category, and then compare the distance between the sample to be classified and these center points, and assign it to the category with the closest distance.

The following are the model principles and mathematical formulas of the nearest center classifier:

Model principle:

  1. For each category, calculate the average of its sample features to get the center point of the category.
  2. For a sample to be classified, calculate its distance from the center point of each category, and then assign it to the category with the closest distance.

mathematical model:

  1. for category

Guess you like

Origin blog.csdn.net/Gyangxixi/article/details/132282457