hypervolume_prune: Removes small hypervolumes from a HypervolumeList

Description Usage Arguments Details Value See Also Examples

View source: R/hypervolume_prune.R

Description

Identifies hypervolumes characterized either by a number of uniformly random points or a volume below a user-specified value and removes them from a HypervolumeList.

This function is useful for removing small features that can occur stochastically during segmentation after set operations or hole detection.

Usage

1
hypervolume_prune(hvlist, num.points.min = NULL, volume.min = NULL, return.ids=FALSE)

Arguments

hvlist

A HypervolumeList object.

num.points.min

The minimum number of points in each input hypervolume.

volume.min

The minimum volume in each input hypervolume

return.ids

If TRUE, returns indices of input list as well as a pruned hypervolume list

Details

Either minnp or minvol (but not both) must be specified.

Value

A HypervolumeList pruned to only those hypervolumes of sizes above the desired value. If returnids=TRUE, instead returns a list structure with first item being the HypervolumeList and the second item being the indices of the retained hypervolumes.

See Also

hypervolume_holes, hypervolume_segment

Examples

1
2
3
4
5
6
7
8
9
# low sample sizes to meet CRAN time requirements
data(iris)
hv1 <- hypervolume_gaussian(iris[,1:3],kde.bandwidth=0.1)
hv1_segmented <- hypervolume_segment(hv1, 
                          num.points.max=100, distance.factor=1,
                          check.memory=FALSE) # intentionally under-segment
hv1_segmented_pruned <- hypervolume_prune(hv1_segmented, 
                          num.points.min=10)
plot(hv1_segmented_pruned)

dc165/Hypervolume-Dev documentation built on Dec. 13, 2020, 6:02 p.m.