jaccard: Compute a Jaccard/Tanimoto similarity coefficient

Description Usage Arguments Value Examples

View source: R/jaccard.R

Description

Compute a Jaccard/Tanimoto similarity coefficient

Usage

1
jaccard(x, y, center = FALSE, px = NULL, py = NULL)

Arguments

x

a binary vector (e.g., fingerprint)

y

a binary vector (e.g., fingerprint)

center

whether to center the Jaccard/Tanimoto coefficient by its expectation

px

probability of successes in x (optional)

py

probability of successes in y (optional)

Value

jaccard returns a Jaccard/Tanimoto coefficient.

Examples

1
2
3
4
set.seed(1234)
x = rbinom(100,1,.5)
y = rbinom(100,1,.5)
jaccard(x,y)

Example output

[1] 0.2933333

jaccard documentation built on May 2, 2019, 12:51 p.m.

Related to jaccard in jaccard...