hypervolume: Hypervolume construction methods

Description Usage Arguments Details Value See Also Examples

View source: R/hypervolume.R

Description

Constructs hypervolumes using one of several possible methods after error-checking input data.

Usage

1
hypervolume(data, method = "gaussian", ...)

Arguments

data

A m x n matrix or data frame, where m is the number of observations and n is the dimensionality.

method

One of "box" (box kernel density estimation), "gaussian" (Gaussian kernel density estimation), or "svm" (one-class support vector machine). See respective functions for details.

...

Further arguments passed to hypervolume_box, hypervolume_gaussian, or hypervolume_svm.

Details

Checks for collinearity, missingness of input data, and appropriate random point coverage. Generates warning/errors as appropriate.

Value

A Hypervolume-class object corresponding to the inferred hypervolume.

See Also

weight_data, estimate_bandwidth, expectation_convex, expectation_ball, expectation_box, hypervolume_threshold

Examples

1
2
3
data(iris)
hv = hypervolume(data=subset(iris, Species=="setosa")[,1:2],method='box')
summary(hv)

Example output

Loading required package: Rcpp
Loading required package: rgl
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 

Building tree... 
done.
Ball query... 

done.
Binding random points... done.
Beginning volume calculation... done. 
***** Object of class Hypervolume *****
Name: untitled
Method: Box kernel density estimate
Number of data points (after weighting): 50
Dimensionality: 2
Volume: 3.699163
Random point density: 853.436295
Number of random points: 3157
Random point values:
	min: 1.000
	mean: 7.513
	median: 5.000
	max:30.000
Parameters:
	kde.bandwidth: 0.3417341 0.3674979
	samples.per.point: 520

hypervolume documentation built on Nov. 17, 2017, 6:21 a.m.