Skip to content

outputs of KNN prediction

1 message · Liaw, Andy

#
Sounds like you are trying to do k-NN regression (i.e., predict numeric
variable given others) with 12 predictors, some of which are categorical.
If so, you're quite possibly out of luck.  k-NN methods depend on distances,
and you need to have a distance that make sense for your problem and works
for mix of both numeric and categorical variables.  There are some (I
believe in the daisy() function in the `cluster' package has one), but no
knn functions that use anything but Euclidean distances (which only make
sense if all variables are numeric).

Even if all your predictors are numeric, you're probably going to have a
hard time finding a k-NN regressor that works in 12 dimensions (at least I
don't know of any implementation, in any language).

Cheers,
Andy
------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments,...{{dropped}}