maxent_toolbox

Maximum Entropy toolbox for MATLAB

View the Project on GitHub orimaoz/maxent_toolbox

maxent.djs

Description

Computes the Jensen-Shannon divergence between two distributions with a finite number of states. The inputs can be vectors of probabilities or log-probabilities (natural logarithm).

Usage

d = maxent.djs(p1,p2)

Arguments

Mandatory arguments

  • p1- Vector of probabilities for the first distribution (or log probabilities in natural logarithm). The numbers should either be >=0 and sum to one, or their natural exponent should be >= and some to one.
  • p2 - Vector of probabilities for the second distribution (ame format as p1)

Output

  • d - Jensen-Shannon divergence between the distributions: DJS(p1||p2)