The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Question regarding distance weighting in KNN models

cherokeecherokee Member Posts: 82 Maven
edited November 2018 in Help
Dear all,

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):
steffen wrote:
Let x be the object to classifiy, and x_i the nearest neighbours, i=1,...,k

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
source: com.rapidminer.operator.learner.lazy.KNNClassificationModel.java
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.

Kind regards,
cherokee

Answers

  • cherokeecherokee Member Posts: 82 Maven
    Dear all,

    this is still a relevant question for me. I have been using RapidMiner in academia for the last four years. I have written my own plugins for different projects and used it in my teachings. If I cannot comprehend RapidMiners operators (and cite their algorithms properly) I will not be able to use them. So I have to find another data mining tool (at least for knn) for me and my students which will be rather cumbersome  :(.

    Is there somebody out there who can help me? Perhaps the author of the class(es) Sebastian Land?

    Kind regards,
    cherokee
Sign In or Register to comment.