Re: question

Peter Reutemann <[email protected]> Tue, 9 Jan 2024 20:17:50 +1300
Newsgroups gmane.comp.ai.weka
Message-ID <CAHoQ12+2Wed5oEWB13OHbAVfQtjYS+B8o8b-Vb7-zE=QCwDweg@mail.gmail.com>
> Hello, I am doing a graduation project in the Weka program at my school. I have a question for you. What does distanceweighting (weight1/distance, weight/1-distance) mean for the knn algorithm?

Have a look at the makeDistribution method of the IBk algorithm:
https://git.cms.waikato.ac.nz/weka/weka/-/blob/a544f94bf46d456cf61fe6c4818fcbd60810c64c/trunk/weka/src/main/java/weka/classifiers/lazy/IBk.java#L849

Each instance in the determined neighborhood gets a weight associated.
For a nominal class, it is used for calculating the class
distribution. In case of a numeric class, this results in the
regression value.

Cheers, Peter
-- 
Peter Reutemann
Dept. of Computer Science
University of Waikato, Hamilton, NZ
Mobile +64 22 190 2375
https://www.cs.waikato.ac.nz/~fracpete/
http://www.data-mining.co.nz/
_______________________________________________
Wekalist mailing list -- [email protected]
Send posts to [email protected]
To unsubscribe send an email to [email protected]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html