powered by
Given training/test data in the predictions on the test data computed. L1, L2 and correlation distances may be used. The data is sphered prior to making the NN predictions.
NNPredict(XyList, dist = c("L2", "COR", "L1"))
list with six elements
distance used
vector of predictions
sphereX
# NOT RUN { AQ <- airquality[complete.cases(airquality),c(2,3,4,1)] XyList <- trainTestPartition(AQ) NNPredict(XyList) # }
Run the code above in your browser using DataLab