Skip to content
Back to formatted view

Raw Message

Message-ID: <12C3BDE3-41BF-4711-B92B-67F0DA8FC099@lanl.gov>
Date: 2008-10-01T00:06:23Z
From: Mike Fugate
Subject: knn class probabilities

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