Options

# Nearest Neighbor enhancements

Hi,

I would like to see NearestNeighbor enhanced in the following ways:

1) When computing the nearest neighbor for a given point, optionally exclude points where distance = 0 (most often, this will be just itself). As it is now, if I build a KNN model on a dataset with K=1, and then apply the model to the dataset, the predictions are perfect since the nearest neighbor of each point is itself. This is similar to what Weka's LinearNNSearch option -S does (although the other nearest neighbor algorithms Weka supports unfortunately don't have this option).

2) Be able to specify the weighting kernel function, rather than just have a toggle for"weighted_vote". This would bring it up to the same capabilities as W-LWL, in which can specify linear, Epanechnikov, tricube, inverse, or gaussian weights.

3) Ability to build a full local polynomial regression (aka loess) model, similar to what locfit does in R.

I would like to see NearestNeighbor enhanced in the following ways:

1) When computing the nearest neighbor for a given point, optionally exclude points where distance = 0 (most often, this will be just itself). As it is now, if I build a KNN model on a dataset with K=1, and then apply the model to the dataset, the predictions are perfect since the nearest neighbor of each point is itself. This is similar to what Weka's LinearNNSearch option -S does (although the other nearest neighbor algorithms Weka supports unfortunately don't have this option).

2) Be able to specify the weighting kernel function, rather than just have a toggle for"weighted_vote". This would bring it up to the same capabilities as W-LWL, in which can specify linear, Epanechnikov, tricube, inverse, or gaussian weights.

3) Ability to build a full local polynomial regression (aka loess) model, similar to what locfit does in R.

0

## Answers

1,751RM Founderthanks for sending those suggestions in. Some are easier to implement, others will of course need more time. However, I have added all points to our Todo list.

Cheers,

Ingo