jsd: Jensen-Shannon divergence for discrete distributions

View source: R/jsd_core.R

jsdR Documentation

Jensen-Shannon divergence for discrete distributions

Description

Computes JSD(p, q) in bits for discrete probability vectors. The value is bounded in [0, 1] for equally weighted mixtures.

Usage

jsd(p, q)

Arguments

p, q

Numeric probability vectors of the same length.

Value

A single numeric value: the Jensen-Shannon divergence in bits.


phontrast documentation built on Oct. 7, 2026, 5:06 p.m.