Description Usage Arguments Value Author(s) References See Also Examples
FuNopaCl
is a function that estimates optimal bandwidth by
k nearest neighbour local cross-validation for the kernel estimate
based on the learning data.
1 | FuNopaCl(X, classes, semimetric, semimetric.params)
|
X |
Matrix with the functional data (curves) each row one |
classes |
Vector of the classes |
semimetric |
A string of choosing the semimetric; allowed are: "Deriv" and "PCA" |
semimetric.params |
Parameters for the semimetric function. |
FuNopaCl
returns an object of the class
FuNopaCl
;
Simon Mueller simon.mueller@mathematik.uni-stuttgart.de
Ferraty, F. and Vieu, P. Nonparametric Functional Data Analysis. Springer 2006.
Semimetric, predict.FuNopaCl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # functional datasets
require (fds)
# fat spectrum dataset
Y <- Fatvalues
X <- t(Fatspectrum$y)
Y[Y < 20] <- 1
Y[Y >= 20] <- 2
# setup semimetric params
semimetric.params <- c()
semimetric.params$q <- 2
semimetric.params$nknot <- 20
semimetric.params$range.grid <- c (min (Fatspectrum$x),
max (Fatspectrum$x))
# learn and testsample
learn <- 1:160
test <- 161:215
# parameter estimation and prediction by cross-validation
Learn.Fat.CV <- FuNopaCl (X[learn, ],
Y[learn],
semimetric = "Deriv",
semimetric.params)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.