R: Random KNN Classification and Regression

rknn {rknn} | R Documentation

## Random KNN Classification and Regression

### Description

Random KNN Classification and Regression

### Usage

    rknn(data, newdata, y, k = 1, r = 500, mtry = trunc(sqrt(ncol(data))),
            cluster = NULL, seed = NULL)
    rknn.cv(data, y, k = 1, r = 500, mtry=trunc(sqrt(ncol(data))),
            cluster=NULL, seed = NULL)
    rknnReg(data, newdata, y, k=1, r=500,  mtry=trunc(sqrt(ncol(data))),
            cluster=NULL, seed=NULL)

### Arguments

`data` | A training dataset.
`newdata` | A testing dataset.
`y` | A vector of responses.
`k` | Number of nearest neighbors.
`r` | Number of KNNs.
`mtry` | Number of features to be drawn for each KNN.
`cluster` | An object of class ‘c("SOCKcluster", "cluster")’
`seed` | An integer seed.

### Value

Return a `RandomKNN` object.

### Author(s)

Shengqiao Li<lishengqiao@yahoo.com>

[Package rknn version 1.2-1 Index]