hypervolume_overlap_statistics: Overlap statistics for set operations (Sorensen, Jaccard,...

View source: R/hypervolume_overlap_statistics.R

hypervolume_overlap_statisticsR Documentation

Overlap statistics for set operations (Sorensen, Jaccard, etc.)

Description

Calculates overlap metrics for two hypervolumes

Usage

hypervolume_overlap_statistics(hvlist)

Arguments

hvlist

A set of hypervolumes calculated from hypervolume_set

Value

A set of multiple metrics

jaccard

Jaccard similarity (volume of intersection of 1 and 2 divided by volume of union of 1 and 2)

sorensen

Sorensen similarity (twice the volume of intersection of 1 and 2 divided by volume of 1 plus volume of 2)

frac_unique_1

Unique fraction 1 (volume of unique component of 1 divided by volume of 1))

frac_unique_2

Unique fraction 2 (volume of unique component of 2 divided by volume of 2))

Examples

## Not run: 
data(penguins,package='palmerpenguins')
penguins_no_na = as.data.frame(na.omit(penguins))
penguins_adelie = penguins_no_na[penguins_no_na$species=="Adelie",
                    c("bill_length_mm","bill_depth_mm","flipper_length_mm")]
penguins_chinstrap = penguins_no_na[penguins_no_na$species=="Chinstrap",
                      c("bill_length_mm","bill_depth_mm","flipper_length_mm")]

hv1 = hypervolume_box(penguins_adelie,name='Adelie')
hv2 = hypervolume_box(penguins_chinstrap,name='Chinstrap')

hv_set <- hypervolume_set(hv1, hv2, check.memory=FALSE)

hypervolume_overlap_statistics(hv_set)

## End(Not run)

hypervolume documentation built on May 29, 2024, 8:19 a.m.