[ENH] Redesign KNN classifier and regressor #39
Labels
classification
Classification package
enhancement
New feature, improvement request or other non-bug code enhancement
regression
Regression package
The KNN Regressor and Classifier were redesigned to replace the inheritance model with containment. The algorithms now always work out the pairwise distance for the train data, which is then never used, since the algorithms that can exploit the triangle inequality to find neighbours are only usable with hard coded scikit-learn distances, not our elastic distances. Any option other than algorithm="brute" breaks the current version. This was all done against my opinion, but I lost the energy to fight it.
They also tightly couple to distances with a string list, rather than use the distance factory as before. This is bad practice, since the addition of new distances will also require a change to the classifier/regressor. Better to use that.
I will dig a little deeper into the scikit algorithm, but my preference would be to abandon the scikit version all together and just implement knn.
The text was updated successfully, but these errors were encountered: