semimetric.deriv
: approximates \(L_2\) metric
between derivatives of the curves based on ther B-spline representation. The
derivatives set with the argument nderiv
.
semimetric.fourier
: approximates \(L_2\) metric between the curves
based on ther B-spline representation. The derivatives set with the argument
nderiv
.
semimetric.hshift
: computes distance between curves
taking into account an horizontal shift effect.
semimetric.mplsr
:
computes distance between curves based on the partial least squares
method.
semimetric.pca
: computes distance between curves based on
the functional principal components analysis method.
In the next semi-metric functions the functional data \(X\) is
approximated by \(k_n\) elements of the Fourier, B--spline, PC or PLS basis
using, \(\hat{X_i} =\sum_{k=1}^{k_n}\nu_{k,i}\xi_k\), where \(\nu_k\)
are the coefficient of the expansion on the basis function
\(\left\{\xi_k\right\}_{k=1}^{\infty}\).
The distances between the q-order derivatives of two curves \(X_{1}\) and
\(X_2\) is,
$$d_{2}^{(q)}\left(X_1,X_2\right)_{k_n}=\sqrt{\frac{1}{T}\int_{T}\left(X_{1}^{(q)}(t)-X_{2}^{(q)}(t)\right)^2
dt}$$ where \(X_{i}^{(q)}\left(t\right)\) denot the \(q\) derivative of
\(X_i\).
semimetric.deriv
and semimetric.fourier
function use a
B-spline and Fourier approximation respectively for each curve and the
derivatives are directly computed by differentiating several times their
analytic form, by default q=1
and q=0
respectively.
semimetric.pca
and semimetric.mprls
function compute
proximities between curves based on the functional principal components
analysis (FPCA) and the functional partial least square analysis (FPLS),
respectively. The FPC and FPLS reduce the functional data in a reduced
dimensional space (q components). semimetric.mprls
function requires
a scalar response.
$$d_{2}^{(q)}\left(X_1,X_2\right)_{k_n}\approx\sqrt{\sum_{k=1}^{k_n}\left(\nu_{k,1}-\nu_{k,2}\right)^2\left\|\xi_k^{(q)}\right\|dt}$$
semimetric.hshift
computes proximities between curves taking into
account an horizontal shift effect.
$$d_{hshift}\left(X_1,X_2\right)=\min_{h\in\left[-mh,mh\right]}d_2(X_1(t),X_2(t+h))$$
where \(mh\) is the maximum horizontal shifted allowed.