Maths for ML / Notation

∑i=1nxi\sum_{i=1}^{n} x_i

summation

Sums and productsBeginner

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

Add up the expression for each value of the index — it's a for-loop that accumulates.

Example

∑i=13i2=1+4+9=14\sum_{i=1}^{3} i^2 = 1+4+9 = 14

In code

sum(x[i] for i in range(n))  # or x.sum()
x.sum()

Where you’ll see it in ML

Losses averaged over a dataset, weighted sums inside every neuron.

Don’t confuse it with

Lessons that use it

← All 94 symbols