The Modern Mathematics of Deep Learningexplained for non-mathematicians

A threshold feature

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.

Features · Transform inputs into features used by a rule.

The project scales bill and flipper measurements using training-row means and scales; its feature vector has two entries.

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: 4.2 Approximating with random pieces

The feature Γ is the signed difference of two threshold indicators using a normalized nonzero vector ξ and a scalar offset ξ̃.

These functions are the building blocks of the random-feature approximation.

Source formula example

Γ(ξ,ξ~)\Gamma(\xi,\tilde{\xi})

illustration · This evaluates one feature at one point; the general random-feature law and approximation theorem require further assumptions.

Symbols

ΓΓ
A scalar-valued feature function.
ξξ
A nonzero real vector.
ξ~ξ̃
A real threshold.
ss
A sign in {−1,1}.
xx
An input vector.

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

  • xi = [1, 0]
  • offset = 0
  • sign = 1
  • x = [-1, 0]

Calculated here

Result expression: { xi, offset, sign, x, value: sign * ((-dot - offset > 0 ? 1 : 0) - (dot - offset > 0 ? 1 : 0)), }

  • norm = Math.sqrt(xi.reduce((s, v) => s + v * v, 0)) Uses: xi
  • dot = xi.reduce((s, v, i) => s + (v * x[i]) / norm, 0) Uses: xi, x, norm

Returns

Example result
xi
array (2 items): [1, 0]
offset
0
sign
1
x
array (2 items): [-1, 0]
value
1

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

Result

Enable JavaScript to run this example.

Technical statement

The numerical values are invented. This evaluates one feature at one point; the general random-feature law and approximation theorem require further assumptions.

Source: Inline notation