Learn R Programming

FRESA.CAD (version 3.4.7)

KNN_method: 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,...)

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

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

Author

Jose G. Tamez-Pena

See Also

class::knn,FRESAScale