Maths for ML / Notation

∏i=1nxi\prod_{i=1}^{n} x_i

product

Sums and productsBeginner

Say it “product from i equals 1 to n of x i”

Multiply the expression together for every value of the index.

Example

∏i=13i=6\prod_{i=1}^{3} i = 6

In code

np.prod(x)
torch.prod(x)

Where you’ll see it in ML

Likelihood of i.i.d. data is a product of probabilities — which is why we take logs to turn it into a sum.

Don’t confuse it with

Lessons that use it

← All 94 symbols