FitNNReg {CPEg} | R Documentation |
Classification using plsr/pcr with NN covariates
FitNNReg(X, y, Xt, yt, Reg = plsr, ncomp = 2, number.NN = (nrow(X) - 3), NN = seq(0, number.NN, 5))
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 |
list with two components: misclassification rates and confusion matricies for both the training and test samples.
Shahidul Islam
S. Islam Ph.D. Thesis
data(Gaussian) attach(Gaussian) ## Not run: FitNNReg(X, y, Xt, yt) ## End(Not run)