| Hkda, Hkda.diag {ks} | R Documentation |
Bandwidth matrices for kernel discriminant analysis for bivariate data.
Hkda(x, x.group, Hstart, bw="plugin", nstage=2, pilot="samse",pre="sphere") Hkda.diag(x, x.group, bw="plugin", nstage=2, pilot="samse", pre="sphere")
x |
matrix of training data values |
x.group |
vector of group labels for training data |
bw |
bandwidth: "plugin" = plug-in, "lscv" = LSCV,
"scv" = SCV |
nstage |
number of stages in the plug-in bandwidth selector (1 or 2) |
pilot |
"amse" = AMSE-optimal pilot bandwidths,
"samse" = single SAMSE-optimal pilot bandwidth |
pre |
"scale" = pre-scaling, "sphere" =
pre-sphering |
Hstart |
(stacked) matrix of initial bandwidth matrices, used in numerical optimisation |
The values that valid for bw are "plugin", "lscv" and
"scv" for
Hkda. These in turn call Hpi,
Hlscv and Hscv. For plugin selectors, all
of nstage, pilot and pre need to be set. For SCV
selectors, currently nstage is always programmed to be one but
the other two need to be set. For LSCV selectors, none of them are required.
For Hkda.diag, only "plugin" or "lscv" are valid
which in turn call Hpi.diag
and Hlscv.diag. Again, nstage, pilot and
pre are available for Hpi.diag but not required for
Hlscv.diag.
Stacked matrix of bandwidth matrices for each training data group.
Duong, T. (2004) Bandwidth Matrices for Multivariate Kernel Density Estimation. Ph.D. Thesis. University of Western Australia.
Simonoff, J. S. (1996) Smoothing Methods in Statistics. Springer-Verlag. New York.
kda.kde, Hpi, Hpi.diag,
Hlscv, Hlscv.diag, Hscv
library(MASS) data(iris) iris.mat <- rbind(iris[,,1], iris[,,2], iris[,,3]) ir <- iris.mat[,c(1,2)] ir.gr <- iris.mat[,5] Hkda(ir, ir.gr, bw="scv", pre="scale") Hkda.diag(ir, ir.gr, bw="plugin", pre="scale")