Description Usage Arguments Value Author(s) References See Also Examples
Semimetric
is a function that calculates a distance matrix for
functional data. A Rcpp port of the semimetric functions of Ferraty and Vieu.
1 | Semimetric(Data1, Data2, semimetric, semimetric.params)
|
Data1 |
Matrix with functional data (curves) each row one; n rows |
Data2 |
Matrix with a second set of functional data (curves) each row one; m rows |
semimetric |
A string of choosing the semimetric; allowed are: "Deriv", "PCA", and "PLS" |
semimetric.params |
Parameters for the semimetric function. |
Semimetric
returns a list with:
semimetric
as the n x m - distance-matrix
...
reusable calculations,
e.g. PCA: the q eigen vectors
Simon Mueller simon.mueller@mathematik.uni-stuttgart.de
http://www.math.univ-toulouse.fr/staph/npfda/
Ferraty, F. and Vieu, P. Nonparametric Functional Data Analysis. Springer 2006.
SemimetricDeriv, SemimetricPCA, SemimetricPLS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # functional data sets
require (fds)
# fat spectrum dataset
X <- t(Fatspectrum$y)
# setup semimetric parameters
semimetric.params <- c ()
semimetric.params$q <- 2
semimetric.params$nknot <- 20
semimetric.params$range.grid <- c (min (Fatspectrum$x),
max (Fatspectrum$x))
# calculate distance matrix
Dist <- Semimetric (X,
X,
semimetric = "SemimetricDeriv",
semimetric.params)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.