inprod_mfd_diag | R Documentation |
Inner product of two multivariate functional data objects, for each observation
inprod_mfd_diag(mfdobj1, mfdobj2 = NULL)
mfdobj1 |
A multivariate functional data object of class |
mfdobj2 |
A multivariate functional data object of class |
It calculates the inner product of two
multivariate functional data objects.
The main function inprod
of the package fda
calculates inner products among
all possible couples of observations.
This means that, if mfdobj1
has n1
observations
and mfdobj2
has n2
observations,
then for each variable n1 X n2
inner products are calculated.
However, often one is interested only in calculating
the n
inner products
between the n
observations of mfdobj1
and
the corresponding n
observations of mfdobj2
. This function provides
this "diagonal" inner products only,
saving a lot of computation with respect to using
fda::inprod
and then extracting the
diagonal elements.
Note that the code of this function calls a modified version
of fda::inprod()
.
mfdobj <- data_sim_mfd()
inprod_mfd_diag(mfdobj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.