Learn R Programming

ribiosUtils (version 1.5-6)

cumJaccardIndex: Cumulative Jaccard Index

Description

Cumulative Jaccard Index

Usage

cumJaccardIndex(list)

cumJaccardDistance(list)

Arguments

list

A list of characters or integers

Value

The cumulative Jaccard Index, a vector of values between 0 and 1, of the same length as the input list

The cumulative Jaccard Index is calculated by calculating the Jaccard Index of element i and the union of elements between 1 and i-1. The cumulative Jaccard Index of the first element is set as 0.0.

The cumulative Jaccard distance is defined in almost the same way, with the only difference the distance is returned. The value of the first element is 1.0.

See Also

cumOverlapCoefficient

Examples

Run this code
# NOT RUN {
myList <- list(first=LETTERS[1:5], second=LETTERS[6:10], third=LETTERS[8:12], fourth=LETTERS[1:12])
cumJaccardIndex(myList)
cumJaccardDistance(myList)

# }

Run the code above in your browser using DataLab