overlap_coef: Various measures for overlapping sets of objects.

Description Usage Arguments Details Value See Also

Description

Functions for computing similarity between two vectors or sets.

- Overlap cofficient is a similarity measure related to the Jaccard index that measures the overlap between two sets, and is defined as the size of the intersection divided by the smaller of the size of the two sets.

- Jaccard index is a statistic used for comparing the similarity and diversity of sample sets.

- Tversky index is an asymmetric similarity measure on sets that compares a variant to a prototype and is related to Jaccard index.

- Cosine similarity is a measure of similarity between two vectors of an inner product space that measures the cosine of the angle between them.

- Morisita's overlap index is a statistical measure of dispersion of individuals in a population. It is used to compare overlap among samples (Morisita 1959). This formula is based on the assumption that increasing the size of the samples will increase the diversity because it will include different habitats (i.e. different faunas).

- Horn's overlap index is based on Shannon's entropy.

Use the repOverlap function for computing similarities of clonesets.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
overlap_coef(.x, .y)

jaccard_index(.x, .y)

tversky_index(.x, .y, .a = .5, .b = .5)

cosine_sim(.x, .y, .quant)

morisita_index(.x, .y, .quant)

horn_index(.x, .y)

Arguments

.x, .y

Character vectors or data frames, sets of objects to intersect, see "Details" for more information.

.a, .b

Alpha and beta parameters for Tversky Index. Default values gives the Jaccard index measure.

.quant

Character. Name of the column with frequencies.

Details

For cosine_sim .x and .y are two numeric vectors. For overlap_coef, jaccard_index and tversky_index .x and .y are character vectors. For morisita_index and horn_index .x and .y are two data frames or data tables with character vectors as first columns and numeric (i.e., number of such elements) as second.

Value

Matrix with overlap values.

See Also

repOverlap


charlotterich/immunarch_code documentation built on Jan. 24, 2020, 12:08 a.m.