jsd: Compare two vectors similarity based on Jensen-Shannon...

Description Usage Arguments Value Examples

View source: R/discovery_prediction.R

Description

Compare two vectors similarity based on Jensen-Shannon Divergence

Usage

1
jsd(p, q)

Arguments

p

First vector

q

Second vector

Value

Returns Jensen-Shannon Divergence of the two vectors

Examples

1
2
3
p <- c(0.2, 0.3, 0.4, 0.5, 0.6)
q <- c(0.6, 0.5, 0.4, 0.3, 0.2)
jsd(p, q)

campbio/BAGEL documentation built on Oct. 6, 2020, 3:59 a.m.