-
-
Notifications
You must be signed in to change notification settings - Fork 26.1k
Description
Description
The NearestCentroid classifier (https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.NearestCentroid.html) does not currently have a partial_fit method, but it would be very useful when running the algorithm in an online fashion. The math for implementing it is simple; it's just a matter of updating the centroids weighted by the number of samples. The implementation could be similar to the partial_fit method of the GaussianNB classifier (except for the obvious mathematical differences). I'm happy to submit an implementation of this, but I wanted to gather input first to see if others have already done this and whether others would find this useful.
Steps/Code to Reproduce
Look at NearestCentroid classifier code and notice that it has not partial_fit method.
Expected Results
There should be a partial_fit method.
Actual Results
There is no partial_fit method.
Versions
N/A