dist_jsd: dist_jsd Calculating Jensen-Shannon divergence basing the...

View source: R/enterotype.R

dist_jsdR Documentation

dist_jsd Calculating Jensen-Shannon divergence basing the formulate JSD(P || Q) = \sqrt{0.5 \times KLD (P||\frac{P + Q}{2}) + 0.5 \times KLD(Q||\frac{P+Q}{2})} .

Description

dist_jsd

Calculating Jensen-Shannon divergence basing the formulate JSD(P || Q) = \sqrt{0.5 \times KLD (P||\frac{P + Q}{2}) + 0.5 \times KLD(Q||\frac{P+Q}{2})} .

Usage

dist_jsd(b)

Arguments

b

a 'bSet' class

Value

Jensen-Shannon divergence data frame

Examples

data(iris)
b <- data.table::as.data.table(iris[1:6, 1:4])
b <- bSet(b = b,
          Features = letters[1:6],
          Samples = LETTERS[1:4])
dist <- dist_jsd(b)

gongcongcong/mbOmic documentation built on July 1, 2023, 1:47 p.m.