KnnPredict: KNN : Predict

Description Usage Arguments Value

View source: R/KnnPredict.R

Description

The function can be used to make prediction on test data using trained model

Usage

1
KnnPredict(knnMdl, testData)

Arguments

knnMdl

a list containing:

  • knnMdl$data - The data set provided by user

  • knnMdl$xCol - The column number of features provided by user or the best subset column number

  • knnMdl$yCol - The column number of target provided by user

  • knn$bestK - The best k nearest neighbor calculated using the function KnnFit

testData

a data frame or matrix, to compute the predictions

Value

a numeric / vector with prediction on test data using model generated by KnnFit


nitesh-1507/DSWE documentation built on April 16, 2020, 5:28 p.m.