rknn: Random KNN Classification and Regression

Description Usage Arguments Value Author(s)

View source: R/RandomKNN.R

Description

Random KNN Classification and Regression

Usage

1
2
3
4
5
6
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<[email protected]>


rknn documentation built on May 30, 2017, 3:33 a.m.