问题
Is there any function/package to perform k-Nearest Neighbor based density estimation in R?
回答1:
class package: function knn
ipred package: function ipredknn
This search on Baron's Site brings up 29 hits.
And the Multivariate Task View has two sections on classification, and has links to a few packages that do knn and related tasks.
回答2:
I haven't used it, but the the kknn package might help.
You might also look at class and knncat for classification using k-nearest neighbor functions.
来源:https://stackoverflow.com/questions/5840983/knn-density-estimation-r