Description Usage Arguments Value Author(s) References See Also Examples
SemimetricDeriv
is a function that calculates a distance matrix based
on the L_2-norm of the derivatives of the functional data. A Rcpp port of the
semimetric function based on derivatives of Ferraty and Vieu.
1 2 3 4 | SemimetricDeriv(Data1,
Data2,
q = 2, nknot = 20, range.grid = c(0,1),
Hhalf = NULL)
|
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 |
q |
Order of derivation |
nknot |
Number of the interior knots for the B-spline basis |
range.grid |
Vector of length two, containing the domain of the curves |
Hhalf |
A design matrix that is based on the B-spline basis design |
Semimetric
returns a list with:
semimetric
as the n x m - distance-matrix
Hhalf
A design matrix that is based on the B-spline
basis design, which can be reused in following semimetric
calculations
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.
Semimetric
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # functional data sets
require (fds)
# fat spectrum dataset
X <- t(Fatspectrum$y)
# setup semimetric parameters
q <- 2
nknot <- 20
range.grid <- c (min (Fatspectrum$x),
max (Fatspectrum$x))
# calculate distance matrix
Dist1 <- SemimetricDeriv (X[1:100, ],
X[101:150, ],
q, nknot, range.grid)
# calculate distance matrix using Hhalf
Dist2 <- SemimetricDeriv (X[1:100, ],
X[151:215, ],
q, nknot, range.grid,
Dist1$Hhalf)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.