[R] knn class probabilities
Mike Fugate
fugate at lanl.gov
Wed Oct 1 02:06:23 CEST 2008
Good Day,
I'm using the knn function in the package class. With k set to 3,
the function returns proportions of 1/3, 0.5, 0.6, 2/3, 3/4, and 1.0
for the test cases. I don't understand how with k set to 3 the
proportions can be anything other than 1/3, 2/3, or 1.0 I've seen
similar inconsistencies with k set to 5.
R version 2.5.0 with redhat linux.
Thanks in advance.
Mike
More information about the R-help
mailing list