FitNNReg(CLEg) | R Documentation |
Classification using plsr/pcr with NN covariates
FitNNReg(X, y, Xt, yt, Reg = plsr, ncomp = 10, number.NN = (nrow(X) - 3), NN = seq(0, number.NN, 5), CVMatrix = FALSE)
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 |
CVMatrix |
logical variable, show cv matrix |
list with two components: misclassification rates and confusion matricies for both the training and test samples.
Shahidul Islam
S. Islam Ph.D. Thesis