KnnPCFit: KNN : Fit

View source: R/KnnPCFit.R

KnnPCFitR Documentation

KNN : Fit

Description

The function models the powercurve using KNN, against supplied arguments

Usage

KnnPCFit(data, xCol, yCol, subsetSelection = FALSE)

Arguments

data

a dataframe or a matrix, to be used in modelling

xCol

a vector or numeric values stating the column number of features

yCol

a numerical or a vector value stating the column number of target

subsetSelection

a boolean, default value is FALSE, if TRUE returns the best feature column number as xCol

Value

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

Examples


data = data1[c(1:100),]
xCol = 2
yCol = 7
subsetSelection = FALSE

knn_model = KnnPCFit(data, xCol, yCol, subsetSelection)


TAMU-AML/DSWE-Package documentation built on Feb. 12, 2024, 11:35 p.m.