The Modern Mathematics of Deep Learningexplained for non-mathematicians

Composing the tent function

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.

Prediction rules and layers · Describe or apply prediction rules, layers and parameters.

The project uses a linear rule with two features. The fitted weights produce scores or normalized mass.

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: 3.2 Simple pieces, many layers

hₙ means composing the tent function h with itself n times. The source relates it to 2ⁿ spikes and scaled interpolation differences.

Composition increases the number of pieces using repeated simple operations.

Source formula example

hh

illustration · The code computes the composition and the source counts for n=2; it does not prove the spike count for all n.

Symbols

hh
The tent function on [0,1].
hnhₙ
The n-fold composition of h.
nn
A positive integer.

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

  • n = 2
  • x = 0.125

Calculated here

Result expression: { n, x, value, spikes: 2 ** n, scaled: value / 2 ** (2 * n), finePoints: 2 ** n + 1, coarsePoints: 2 ** (n - 1) + 1, neurons: 2 * n, }

  • value = x Uses: x
  • for (let i = 0; i < n; i++) value = h(value); Uses: n, value, h

Returns

Example result
n
2
x
0.125
value
0.5
spikes
4
scaled
0.03125
finePoints
5
coarsePoints
3
neurons
4

Some runtime paths or values are not resolved here.

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

Result

Enable JavaScript to run this example.

Technical statement

The numerical values are invented. The code computes the composition and the source counts for n=2; it does not prove the spike count for all n.

Source: Inline notation