The Modern Mathematics of Deep Learningexplained for non-mathematicians

A product-distributed sample

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.

Observations and sampling · Describe examples, targets and samples.

The selected rows supply measurements and known answers to training; held-out IDs remain separate.

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

The source models the training examples as independent draws from the same distribution. The joint distribution of the sample is the product distribution.

For two independent fair bits, all four ordered pairs have probability 1/4.

This assumption lets source results reason about repeated sampling.

Source formula example

S=(Z(i))i=1m∼PZm{S}=(Z^{(i)})_{i=1}^{m}\sim{\mathbbm{P}}_{Z}^{m}

exact · The code enumerates the complete distribution for two fair bits. Real data need not satisfy the independence or identical-distribution assumption.

Symbols

SS
Ordered sample of m examples.
PZℙ_Z
Probability distribution of one example.
PZmℙ_Z^m
Product distribution of m independent examples.

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

Initial values in code

  • pairs = [ [0, 0], [0, 1], [1, 0], [1, 1], ]
  • probability = 0.5

Calculated here

Result expression: { pairs, probabilities, totalProbability: probabilities.reduce((a, b) => a + b, 0), }

  • probabilities = pairs.map((pair) => pair.reduce( (product, value) => product * (value === 1 ? probability : 1 - probability), 1, ), ) Uses: pairs, probability

Returns

Example result
pairs
array (4 items): [array (2 items): [0, 0], array (2 items): [0, 1], array (2 items): [1, 0], array (2 items): [1, 1]]
probabilities
array (4 items): [0.25, 0.25, 0.25, 0.25]
totalProbability
1

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