FitkNN(CLEg)R Documentation

NN classification

Description

kNN classification

Usage

FitkNN(X, y, Xt, yt, k = 1)

Arguments

X design matrix, training sample
y binary response vector of 1 and -1
Xt design matrix, test sample
yt binary response vector of 1 and -1
k number of nearest neighbours

Details

Value

list with two components: misclassification rates and confusion matricies for both the training and test samples.

Author(s)

AIM

Examples






[Package CLEg version 1.0 Index]