matipl2dpar {dad} | R Documentation |
Matrix of L^2
inner products of Gaussian densities
Description
Computes the matrix of the L^2
inner products between several multivariate (p > 1
) or univariate (p = 1
) Gaussian densities, given their parameters (mean vectors and covariance matrices if the densities are multivariate, or means and variances if univariate).
Usage
matipl2dpar(meanL, varL)
Arguments
meanL |
list of the means ( |
varL |
list of the variances ( |
Value
Positive symmetric matrix whose order is equal to the number of densities, consisting of the pairwise inner products between the Gaussian densities.
Author(s)
Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Gilles Hunault, Sabine Demotes-Mainard
See Also
matipl2d
for the distance matrix between probability densities which are estimated from the data.
Examples
data(roses)
# Multivariate:
X <- roses[,c("Sha","Den","Sym","rose")]
summary(X)
mean.X <- as.list(by(X[, 1:3], X$rose, colMeans))
var.X <- as.list(by(X[, 1:3], X$rose, var))
# Gaussian densities, given parameters
matipl2dpar(mean.X, var.X)
# Univariate :
X1 <- roses[,c("Sha","rose")]
summary(X1)
mean.X1 <- by(X1$Sha, X1$rose, mean)
var.X1 <- by(X1$Sha, X1$rose, var)
# Gaussian densities, given parameters
matipl2dpar(mean.X1, var.X1)