Learn R Programming

bestglm (version 0.37.3)

NNPredict: Nearest Neighbour Regression Prediction

Description

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.

Usage

NNPredict(XyList, dist = c("L2", "COR", "L1"))

Arguments

XyList

list with six elements

dist

distance used

Value

vector of predictions

See Also

sphereX

Examples

Run this code
# 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