Learn R Programming

MoEClust (version 1.4.1)

noise_vol: Approximate Hypervolume Estimate

Description

Computes simple approximations to the hypervolume of univariate and multivariate data sets. Also returns the location of the centre of mass.

Usage

noise_vol(data,
          method = c("hypvol", "convexhull", "ellipsoidhull"),
          reciprocal = FALSE)

Arguments

data

A numeric vector, matrix, or data frame of observations. Categorical variables are not allowed, and covariates should not be included. If a matrix or data frame, rows correspond to observations and columns correspond to variables. There must be more observations than variables.

method

The method used to estimate the hypervolume. The default method uses the function hypvol. The "convexhull" and "ellipsoidhull" options require loading the geometry and cluster libraries, respectively. This argument is only relevant for multivariate data; for univariate data, the range of the data is used.

reciprocal

A logical variable indicating whether or not the reciprocal hypervolume is desired rather than the hypervolume itself. The default is to return the hypervolume.

Value

A list with the following two elements:

vol

A hypervolume estimate (or its inverse).

This can be used as the hypervolume parameter for the noise component when observations are designated as noise in MoE_clust.

loc

A vector of length ncol(data) giving the location of the centre of mass.

This can help in predicting the fitted values of models fitted with noise components via MoE_clust.

See Also

hypvol, convhulln, ellipsoidhull

Examples

Run this code
# NOT RUN {
data(ais)
noise_vol(ais[,3:7], reciprocal=TRUE)

noise_vol(ais[,3:7], reciprocal=FALSE, method="convexhull")
# }

Run the code above in your browser using DataLab