liveBook · Manning

Importance weight

As explained in Machine Learning Algorithms in Depth

An importance weight is a numerical factor that adjusts the contribution of a sample or outcome in a weighted estimate.

An importance weight adjusts a sampled outcome’s contribution when the sampling procedure differs from the quantity being estimated. In importance sampling, draw x from a proposal distribution q rather than the target distribution p, then assign w(x) = p(x)/q(x). Samples relatively more likely under p than q receive more weight. section 2.7

For normalized p and q, the weighted Monte Carlo estimate of Eₚ[f(x)] is (1/N)Σᵢw(xᵢ)f(xᵢ), with xᵢ sampled from q. The ratio changes each proposal sample’s contribution to match the target integral. If p is unnormalized, the same sum estimates an unnormalized integral; a normalized expectation also requires accounting for the missing normalization constant. section 2.7

Self-avoiding random walk

A walk samples uniformly among its currently available neighboring lattice cells. Starting at 1, its weight is multiplied at each step by the number of available neighbors. Trials record that weight alongside squared distance, and the weights are used to compute a weighted mean square distance. A trial stops when no neighbor is available. section 2.4

Figure 2.16 IS components (left) and IS estimate (right)
figure

Plots the target, proposal, and weighted integrand beside the importance-sampling estimate as sample count increases. section 2.7

How Machine Learning Algorithms in Depth covers it

How deep it goes
Defines the target-to-proposal ratio, gives a sample-and-weight procedure, and shows a separate stepwise walk weight.
Examples
Uses a sine-function expectation with a Chi-shaped target and Gaussian proposal, plus weighted squared distances from lattice walks.
What it assumes
Assumes familiarity with probability distributions, expected values, and Monte Carlo sampling; defines the weight ratio explicitly.
What you can do after
Build it from scratch by sampling a proposal, calculating target-to-proposal ratios, and averaging weighted function values.
How it connects
Connects importance sampling to proposal distributions, target distributions, Monte Carlo integration, and self-avoiding random walks.

Also explained in

Compare how 3 books explain importance weight →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Algorithms in Depth. The section links point to the parts of the book it draws on.