Gaussian mixture-based hypervolume estimation of multivariate data
hypvolgmm.RdEstimates the hypervolume of a multivariate dataset by fitting a Gaussian Mixture Model (GMM).
Usage
hypvolgmm(
data,
method = c("lhs", "smc", "is", "none"),
G = 1:9,
prior = TRUE,
nsim = 1000000,
hdlevel = NULL,
GMM = NULL,
...
)Arguments
- data
A numeric vector, matrix, or data frame. If a matrix or data frame, rows correspond to observations and columns correspond to variables. Categorical variables and missing values are not allowed.
- method
A character specifying the sampling scheme to be used for the estimation. Available options are:
"lhs"= Latin Hypercube Sampling (default);"smc"= Simple Monte Carlo sampling;"is"= Importance Sampling.
- G
An integer vector specifying the numbers of mixture components to fit, then model selection if performed via BIC.
- prior
A logical specifying if a prior (on the covariance) matrix should be used for regularization.
- nsim
Integer specifying the number of simulations used in MC sampling.
- hdlevel
A numerical value in the range (0,1] specifying the level of the highest density region (HDR) to be used for defining the GMM hull. If not provided, a default data-driven value is computed.
- GMM
Optional
MclustordensityMclustobject to be used. If provided, thedataargument is ignored.- ...
Further arguments passed to or from other methods.
Value
Returns a list containing the following elements:
GMMAn object of classdensityMclustcontaining the fitted Gaussian mixture.methodThe sampling method employed.hdlevelThe hdlevel used for definying the GMM hull.nsimThe number of simulations used in MC sampling.ESSThe effective sample size.hThe density level of GMM hull.gammaThe estimated parameter used for adjustmentlogvolThe estimated log hypervolume.
Examples
x = matrix(rnorm(100), ncol = 2)
mod = hypvolgmm(x)
summary(mod$GMM)
#> -------------------------------------------------------
#> Density estimation via Gaussian finite mixture modeling
#> -------------------------------------------------------
#>
#> Mclust XXX (ellipsoidal multivariate normal) model with 1 component:
#>
#> Prior: defaultPrior(shrinkage = 0)
#>
#> log-likelihood n df BIC ICL
#> -141.2447 50 5 -302.0495 -302.0495
mod$logvol
#> [1] 2.594516