RapidMiner 9.7 is Now Available
Lots of amazing new improvements including true version control! Learn more about what's new here.
Question regarding distance weighting in KNN models
I'm not sure if this is the right section for my question. However, since I haven't found any better place I will post it here. Please move the topic if appropriate.
For the KNN operator there is the possibility to weight the nearest neighbors by distance. The exact algorithm is as follows (reposted from another topic/author):
This algorithm is also used in KNNRegressionModel. I haven't seen this formula for weighting before. Can somebody please cite the paper/book where this formula is introduced.
steffen wrote: Let x be the object to classifiy, and x_i the nearest neighbours, i=1,...,ksource: com.rapidminer.operator.learner.lazy.KNNClassificationModel.java
totalDistance = sum(dist(x,x_i)) for all i
totalSimiliarity= sum ( 1-(dist(x,x_i)/totalDistance)) for all i <= see here
counter is then weighted by:
(1-(dist(x,x_i)/totalDistance))/totalSimilarity <= weighted by normalized similarity