Maths for ML / Notation

Ex∼p[f(x)]\mathbb{E}_{x\sim p}[f(x)]

expectation

Probability and statisticsBeginner

Say it “expected value of f of x, x drawn from p”

The average value you'd get if you sampled many times — weighted by probability.

Example

E[die roll]=3.5\mathbb{E}[\text{die roll}] = 3.5

In code

np.mean(samples)
samples.mean()

Where you’ll see it in ML

The training loss is an expectation over the data distribution, estimated by a batch average.

Don’t confuse it with

← All 94 symbols