KNN_method {FRESA.CAD} | R Documentation |
KNN Setup for KNN prediction
Description
Prepares the KNN function to be used to predict the class of a new set
Usage
KNN_method(formula = formula,data=NULL,...)
Arguments
formula |
the base formula to extract the outcome |
data |
the data to be used for training the KNN method |
... |
parameters for the KNN function and the data scaling method |
Value
trainData |
The data frame to be used to train the KNN prediction |
scaledData |
The scaled training set |
classData |
A vector with the outcome to be used by the KNN function |
outcome |
The name of the outcome |
usedFeatures |
The list of features to be used by the KNN method |
mean_col |
A vector with the mean of each training feature |
disp_col |
A vector with the dispesion of each training feature |
kn |
The number of neigbors to be used by the predict function |
scaleMethod |
The scaling method to be used by FRESAScale() function |
Author(s)
Jose G. Tamez-Pena
See Also
class::knn
,FRESAScale
[Package FRESA.CAD version 3.4.8 Index]