knn4: k-Nearest Neighbor classifier with multiple k

Description Usage Arguments Details Value

Description

k-Nearest Neighbor classifier with multiple k

Usage

1
knn4(x, y, k)

Arguments

x

a matrix of training set predictors

y

a factor vector of training set classes

k

number of neighbours considered.

Details

knn3 is essentially the same code as ipredknn and knn3Train is a copy of knn. The underlying C code from the class package has been modified to return the vote percentages for each class (previously the percentage for the winning class was returned).

Value

An object of class knn3. See predict.knn3.


MalteThodberg/BEEF documentation built on May 7, 2019, 2:09 p.m.