OptimalK(CLEg)R Documentation

Optimal K

Description

This function will provide the series of NN values by predicting the class in leave-one-out method. That is, we fit the model for all observations except one and then apply the rule to that left observation and find the predicted class.

Usage

OptimalK(i, x, cl, ...)

Arguments

i the row numbers where to apply the leave-one-out method
x data frame or matrix
cl defining y vector taking values -1 and 1 for two classes
... ...

Details

Value

the value of K

Author(s)

Shahidul Islam

See Also

FitNNReg

Examples






[Package CLEg version 2.0 Index]