Skip to contents

Calculate the Jaccard similarity index (JSI) between two vectors

Usage

jaccard_index(a, b)

Arguments

a, b

two vectors

Value

The JSI of the two vectors, a single value between 0 and 1.

Examples

jaccard_index(1:4, 2:6)
#> [1] 0.5