Skip to main content
be specific in the title what extra terms we are talking about
Source Link
Silverfish
  • 23.9k
  • 28
  • 105
  • 206

Why are there the extra terms $-p_i+q_i$ in SciPy's implementation of the Kullback-Leibler divergence?

Why do some definitions of the Kullback-Leibler divergence include extra terms $-p_i + q_i$? For example, kl_div() (in the Python scipy.special module) seems to definedefines the Kullback-Leibler divergence as $$ \sum_i p_i \ln\frac{p_i}{q_i} - p_i + q_i. $$

The documentation says:

The origin of this function is in convex programming; see [1] for details. This is why the function contains the extra terms over what might be expected from the Kullback-Leibler divergence.

I don't have the referenced book at hand. What is the justification or motivation for the additional $-p_i + q_i$ terms?

Anti-closing note: This is not a question about software, but about the concept behind it.

Why are there the extra terms in SciPy's implementation of the Kullback-Leibler divergence?

Why do some definitions of the Kullback-Leibler divergence include extra terms $-p_i + q_i$? For example, kl_div() (in the Python scipy.special module) seems to define the Kullback-Leibler divergence as $$ \sum_i p_i \ln\frac{p_i}{q_i} - p_i + q_i. $$

The documentation says:

The origin of this function is in convex programming; see [1] for details. This is why the function contains the extra terms over what might be expected from the Kullback-Leibler divergence.

I don't have the referenced book at hand. What is the justification or motivation for the additional $-p_i + q_i$ terms?

Anti-closing note: This is not a question about software, but about the concept behind it.

Why are there extra terms $-p_i+q_i$ in SciPy's implementation of Kullback-Leibler divergence?

Why do some definitions of the Kullback-Leibler divergence include extra terms $-p_i + q_i$? For example, kl_div() (in the Python scipy.special module) defines the Kullback-Leibler divergence as $$ \sum_i p_i \ln\frac{p_i}{q_i} - p_i + q_i. $$

The documentation says:

The origin of this function is in convex programming; see [1] for details. This is why the function contains the extra terms over what might be expected from the Kullback-Leibler divergence.

I don't have the referenced book at hand. What is the justification or motivation for the additional $-p_i + q_i$ terms?

Anti-closing note: This is not a question about software, but about the concept behind it.

Copy edited (e.g. ref. <https://en.wikipedia.org/wiki/SciPy>).
Source Link

Why are there the extra terms in scipy'sSciPy's implementation of the Kullback-Leibler divergence?

Why do some definitions of the Kullback-Leibler divergence include extra terms $-p_i + q_i$? For example, kl_div() (in the Python scipy.special module) seems to define the Kullback-Leibler divergence as $$ \sum_i p_i \ln\frac{p_i}{q_i} - p_i + q_i. $$

The documentation says:

The origin of this function is in convex programming; see [1] for details. This is why the function contains the extra terms over what might be expected from the Kullback-Leibler divergence.

I don't have the referenced book at hand. Can someone provide a shortWhat is the justification/motivation or motivation for the additional $-p_i + q_i$ terms?

Anti-closing note: This is not a question about software, but about the concept behind it.

Why the extra terms in scipy's implementation of Kullback-Leibler divergence?

Why do some definitions of Kullback-Leibler divergence include extra terms $-p_i + q_i$? For example kl_div() (in the Python scipy.special module) seems to define the Kullback-Leibler divergence as $$ \sum_i p_i \ln\frac{p_i}{q_i} - p_i + q_i. $$

The documentation says:

The origin of this function is in convex programming; see [1] for details. This is why the function contains the extra terms over what might be expected from the Kullback-Leibler divergence.

I don't have the referenced book at hand. Can someone provide a short justification/motivation for the additional $-p_i + q_i$ terms?

Anti-closing note: This is not a question about software, but about the concept behind it.

Why are there the extra terms in SciPy's implementation of the Kullback-Leibler divergence?

Why do some definitions of the Kullback-Leibler divergence include extra terms $-p_i + q_i$? For example, kl_div() (in the Python scipy.special module) seems to define the Kullback-Leibler divergence as $$ \sum_i p_i \ln\frac{p_i}{q_i} - p_i + q_i. $$

The documentation says:

The origin of this function is in convex programming; see [1] for details. This is why the function contains the extra terms over what might be expected from the Kullback-Leibler divergence.

I don't have the referenced book at hand. What is the justification or motivation for the additional $-p_i + q_i$ terms?

Anti-closing note: This is not a question about software, but about the concept behind it.

include Q in first sentence so search engine snippet results are more meaningful
Source Link
Silverfish
  • 23.9k
  • 28
  • 105
  • 206

Anti-closing preamble: This is not a question about software, but about the concept behind it.

Python's Why do some definitions of Kullback-Leibler divergence include extra terms $-p_i + q_i$? For example kl_div() (in the Python scipy.special module) seems to define the Kullback-Leibler divergence as $$ \sum_i p_i \ln\frac{p_i}{q_i} - p_i + q_i. $$

The documentation says:

The origin of this function is in convex programming; see [1] for details. This is why the function contains the extra terms over what might be expected from the Kullback-Leibler divergence.

I don't have the referenced book at hand. Can someone provide a short justification/motivation for the additional $-p_i + q_i$ terms?

Anti-closing note: This is not a question about software, but about the concept behind it.

Anti-closing preamble: This is not a question about software, but about the concept behind it.

Python's kl_div() (in the scipy.special module) seems to define the Kullback-Leibler divergence as $$ \sum_i p_i \ln\frac{p_i}{q_i} - p_i + q_i. $$

The documentation says:

The origin of this function is in convex programming; see [1] for details. This is why the function contains the extra terms over what might be expected from the Kullback-Leibler divergence.

I don't have the referenced book at hand. Can someone provide a short justification/motivation for the additional $-p_i + q_i$ terms?

Why do some definitions of Kullback-Leibler divergence include extra terms $-p_i + q_i$? For example kl_div() (in the Python scipy.special module) seems to define the Kullback-Leibler divergence as $$ \sum_i p_i \ln\frac{p_i}{q_i} - p_i + q_i. $$

The documentation says:

The origin of this function is in convex programming; see [1] for details. This is why the function contains the extra terms over what might be expected from the Kullback-Leibler divergence.

I don't have the referenced book at hand. Can someone provide a short justification/motivation for the additional $-p_i + q_i$ terms?

Anti-closing note: This is not a question about software, but about the concept behind it.

Became Hot Network Question
Source Link
Igor F.
  • 9.7k
  • 1
  • 30
  • 64
Loading