FitNNReg {CPEg}R Documentation

Classification using NN covariates

Description

Classification using plsr/pcr with NN covariates

Usage

FitNNReg(X, y, Xt, yt, Reg = plsr, ncomp = 2, number.NN = (nrow(X) - 3), NN = seq(0, number.NN, 5))

Arguments

X design matrix, training sample
y binary response vector of 1 and -1
Xt design matrix, test sample
yt binary response vector of 1 and -1
Reg Method of regression, which can be plsr or pcr
ncomp Number of components taken in the pls/pc regression.
number.NN Number of nearest neighbors to be considered
NN Sequence of ordered nearest neighbor covariates to be taken

Details

Value

list with two components: misclassification rates and confusion matricies for both the training and test samples.

Author(s)

Shahidul Islam

References

S. Islam Ph.D. Thesis

See Also

FitLDA

Examples

data(Gaussian)
attach(Gaussian)
## Not run: 
FitNNReg(X, y, Xt, yt)
## End(Not run)

[Package CPEg version 1.1 Index]