powered by
The function models the powercurve using KNN, against supplied arguments
KnnPCFit(data, xCol, yCol, subsetSelection = FALSE)
a list containing :
data - The data set provided by user
xCol - The column number of features provided by user or the best subset column number
yCol - The column number of target provided by user
bestK - The best k nearest neighbor calculated using the function
RMSE - The RMSE calculated using the function for provided data using user defined features and best obtained K
MAE - The MAE calculated using the function for provided data using user defined features and best obtained K
a dataframe or a matrix, to be used in modelling
a vector or numeric values stating the column number of features
a numerical or a vector value stating the column number of target
a boolean, default value is FALSE, if TRUE returns the best feature column number as xCol
data = data1[c(1:100),] xCol = 2 yCol = 7 subsetSelection = FALSE knn_model = KnnPCFit(data, xCol, yCol, subsetSelection)
Run the code above in your browser using DataLab