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)
Run the code above in your browser using DataLab