NNPredict: Nearest Neighbour Regression Prediction

Description Usage Arguments Value Author(s) See Also Examples

View source: R/sphereX.R

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

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

Arguments

XyList

list with six elements

dist

distance used

Value

vector of predictions

Author(s)

A. I. McLeod

See Also

sphereX

Examples

1
2
3
AQ <- airquality[complete.cases(airquality),c(2,3,4,1)]
XyList <- trainTestPartition(AQ)
NNPredict(XyList) 

Example output

Loading required package: leaps
 [1]  23  18  14  11 168  16  36  65  11  13 168 122  32  50  50  44  32  73  50
[20]  32  85  13  45  89 122  85  78  78  45  16  30  13  16  14   9   9  24

bestglm documentation built on March 26, 2020, 7:25 p.m.