Skip to content

Week 3 Lecture 1

During training, we can’t know how well the model will generalize to data outside of the training dataset. BUT we can calculate approximate bounds on the performance of the model.

𝐿(ℎ) (basically risk) can’t be computed, since we don’t know the distribution. 𝐿̂ the other hand CAN be calculated, although it’s accuracy depends on the used dataset. We need bounds to show how good it actually is in reality.

𝐿̂ is just the mean of the original loss function over a given set.

How different is 𝐿̂ from 𝐿?

Markov’s Inequality

Suppose 𝑋 is a non-negative random variable. When, for all 𝜀>0

ℙ(𝑋≥𝜀)≤𝔼[𝑥]𝜀
X must be positive for this to work, if you can’t make sure of that, you should make modifications that keeps the probability like: ℙ(𝑋<𝜀)=ℙ(𝑒𝑋<𝑒𝜀) (because these share the probability, now the inequality can kick in)

Extended Markov

If 𝑓 is monotonically increasing, such that 𝑓(𝑋) is non-negative, then for all 𝜀>0

ℙ(𝑋≥𝑒)≤𝔼[𝑓(𝑋)]𝑓(𝜀)

Chebyshev’s Inequality

Given any random variable 𝑋, and 𝜀>0

He uses squares that keeps probability then kall in Markov to get the inequality of (𝑋−𝔼[𝑋])2≥𝜀2 which then collapses to the variance by definition.
ℙ(|𝑋−𝔼[𝑋]|≥𝜀)≤Var(𝑋)𝜀2

For I.I.D variables

By setting 𝑋 to the sample mean (𝜇̂𝑛) of some i.i.d random variables 𝑋1,𝑋2,…,𝑋𝑛:

ℙ(|𝜇̂𝑛−𝜇|≥𝜀)≤Var(𝑋1)𝑛𝜀2
Meaning that by increasing 𝑛, the bound gets closer to 0, decaying at a rate 1𝑛

Hoeffding’s inequality

Full I.I.D. is not required, independence is sufficient here

𝑋1,…,𝑋𝑛 independent (not necessarily i.i.d) random variables, with support [0,1] and 𝑆𝑛=∑𝑖=1𝑛𝑋𝑖. Then for all 𝜀>0

  1. ℙ(𝑆𝑛−𝔼[𝑆𝑛]≥𝜀)≤𝑒−2𝜀2𝑛
  2. ℙ(𝑆𝑛−𝔼[𝑆𝑛]≤−𝜀)≤𝑒−2𝜀2𝑛

Thus:

ℙ(|𝑆𝑛−𝔼[𝑆𝑛]|≥𝜀)≤2𝑒−2𝜀2𝑛
support: interval that a random variable can take numbers from [0,1]

This inequality implies:

ℙ(|𝑆𝑛𝑛−𝔼[𝑆𝑛]𝑛|≥𝜀)≤2𝑒−2𝑛𝜀2

Because we substituted 𝑦=𝑛𝜀 and 𝑦 gets squared then divided by 𝑛, the result is just 𝑛2𝜀21𝑛=𝑛𝜀2

ℙ(|𝑆𝑛−𝔼[𝑆𝑛]|≥𝑦)≤2𝑒−2𝑦2𝑛

Where 𝑆𝑛𝑛 can be understood as 𝜇̂𝑛 and 𝔼[𝑆𝑛]𝑛 as 𝜇. Thus this is a bound on the error of the mean. This is similar to Chebyshev’s Inequality, BUT it decays exponentially.