Description Usage Arguments Value Author(s) Examples

Implement the weighted nearest neighbor classification algorithm to predict the label of a new input using a training data set.

1 | ```
mywnn(train, test, weight)
``` |

`train` |
Matrix of training data sets. An n by (d+1) matrix, where n is the sample size and d is the dimension. The last column is the class label. |

`test` |
Vector of a test point. |

`weight` |
The weight vector for all n nearest neighbors. |

It returns the predicted class label of the new test point.

Wei Sun, Xingye Qiao, and Guang Cheng

1 2 3 4 5 6 7 8 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.