KnnPredict | R Documentation |
The function can be used to make prediction on test data using trained model
KnnPredict(knnMdl, testData)
knnMdl |
a list containing:
|
testData |
a data frame or matrix, to compute the predictions |
a numeric / vector with prediction on test data using model generated by KnnFit
data = data1[c(1:100),]
xCol = 2
yCol = 7
subsetSelection = FALSE
knn_model = KnnPCFit(data, xCol, yCol, subsetSelection)
testData = data1[c(101:110), ]
prediction = KnnPredict(knn_model, testData)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.