The Modern Mathematics of Deep Learningexplained for non-mathematicians

Population risk

Penguin learning project

The project uses 342 complete Palmer penguin records: 240 training-pool and 102 held-out rows. The selected training rows determine feature scaling and model parameters. Source CSV

This project trains weights with softmax, unlike the homepage lab, which uses nearest species averages. Same penguin measurements; different classification methods. Predictions can differ.

Risk and assessment · Distinguish loss on a sample from expected loss.

The fitted rule is evaluated on 102 held-out observations, not used for fitting.

Consider this concept alongside the project; its source assumptions may differ. These observations do not prove a theorem.

Input: 12 × 2; Held-out evaluation: 102 · #58 · 40.6 mm, 193 mm. Known answer: Adélie; Prediction: Adélie · [≈0.7383, ≈0.2444, ≈0.01737].

Used in these source sections: 1.2 Learning from examples · 1.2.3 Does it work on new examples? · 1.3 The questions ahead · More source sections

Population risk is the expected loss under the distribution of examples. A probability-weighted sum computes it exactly for a finite distribution.

Population risk describes performance over the full distribution, not just a training sample.

Source formula example

R(f)≔E[L(f,Z)]=∫ZL(f,z) dPZ(z).{\mathcal{R}}(f)\coloneqq{\mathbbm{E}}\big[{\mathcal{L}}(f,Z)\big]=\int_{{\mathcal{Z}}}{\mathcal{L}}(f,z)\,\mathrm{d}{\mathbbm{P}}_{Z}(z).

exact · The example uses a fully specified two-outcome distribution. General expectations can require integration and cannot be inferred exactly from a finite sample.

Symbols

ZZ
A random example with a probability distribution.
L(f,Z)ℒ(f,Z)
Loss of f on that example.

Source formula example

This source example uses its own inputs and assumptions. Editing it does not change the project.

Edit a value or the code, then run the example. This is a finite demonstration, not a proof of the paper’s theorem.

This example’s data flow

You choose

  • input.firstLoss = 0

Initial values in code

  • probabilities = [0.25, 0.75]

Calculated here

Result expression: { losses, probabilities, risk: losses.reduce((sum, loss, i) => sum + loss * probabilities[i], 0), }

  • losses = [input.firstLoss, 4] Uses: input.firstLoss

Returns

Example result
losses
array (2 items): [0, 4]
probabilities
array (2 items): [0.25, 0.75]
risk
3

Read numbers from input and return the result. JavaScript basics.

Result

Enable JavaScript to run this example.

Technical statement

Change the input and run the same code again. The displayed result uses the values shown above.

Source: Source expression