Normalizing very small hypothesis weights

An inference routine stores a log weight, the natural logarithm of an unnormalized positive weight, for each of three mutually exclusive and exhaustive hypotheses. After incorporating the evidence, these values are


ℓ1=−1000,ℓ2=−1002,ℓ3=−1005.\ell_1=-1000,\qquad \ell_2=-1002,\qquad \ell_3=-1005.


Directly exponentiating these values in standard double-precision arithmetic causes numerical underflow. Arrange the supplied operations into the maximum-shift procedure for computing normalized posterior probabilities. Each operation uses quantities established earlier in the procedure.

  1. 1.

    Calculate each posterior probability as pi=ui/Zp_i=u_i/Z.

  2. 2.

    Find the maximum log weight, m=max⁡iℓim=\max_i\ell_i.

  3. 3.

    Calculate the shifted log weights, si=ℓi−ms_i=\ell_i-m.

  4. 4.

    Sum the shifted weights to obtain Z=∑iuiZ=\sum_i u_i.

  5. 5.

    Exponentiate the shifted values to obtain ui=exp⁡(si)u_i=\exp(s_i).

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Probabilistic Reasoning Questions: