liveBook · Manning

Log probability

As explained in Math and Architectures of Deep Learning

The natural logarithm of a probability density or mass value, used to make products and tiny probabilities easier to compute with.

Log probability is the logarithm of a probability or density value. Machine learning commonly uses it because exponential probability expressions become simpler after taking logarithms. section 5.9 section 6.6.1

The log transform is useful because it preserves the maximizing value while changing products into sums:

  • log(e^x) = x section 6.6.1
  • log(Π e^x(i)) = Σ x(i), turning a product of exponential terms into an additive expression. section 6.6.1
  • Maximizing likelihood and maximizing log-likelihood produce the same parameter values, while the logarithmic form simplifies the optimization. section 6.6.1 section 6.6.2

Gaussian maximum likelihood

For adult female height samples, maximizing the Gaussian log-likelihood with respect to the mean and variance yields the sample mean and variance. Those estimates define a Gaussian that can assign a probability to a new height. section 6.8

Equation 6.20

Inspect the likelihood expression and its logarithmic optimization counterpart. section 6.6.1

How Math and Architectures of Deep Learning covers it

How deep it goes
Explains the product-to-sum identity and optimization rationale, then applies them to Gaussian estimation without deriving every distribution internally.
Examples
Uses exponential identities, Gaussian likelihood optimization, adult height samples, and PyTorch distribution calculations.
What it assumes
Assumes familiarity with probability distributions, exponential functions, and likelihood-based parameter estimation.
What you can do after
Apply it via PyTorch distributions and optimize Gaussian or other exponential-family likelihoods in logarithmic form.
How it connects
Connects probability distributions, likelihood, maximum likelihood estimation, Gaussian distributions, and Gaussian mixture models.

Also explained in

Compare how 8 books explain log probability →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Math and Architectures of Deep Learning. The section links point to the parts of the book it draws on.