The Modern Mathematics of Deep Learningexplained for non-mathematicians

Thresholded coefficient approximation

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.

Frames and sparse signals · Encode or reconstruct signals with frames and dictionaries.

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: 7.2 A few building blocks at a time

Compare a thresholded dictionary projection with the source coefficient vector.

Thresholding trades coefficient size for zeros.

Source formula example

ϕ≈TD,b(x)\phi\approx\mathcal{T}_{D,b}(x)

illustration · The approximation quality and support recovery depend on dictionary, sparsity, and threshold conditions; this example does not establish them.

Symbols

φφ
Coefficient vector.
DD
Dictionary; the toy uses the identity.
bb
Threshold vector; the toy uses 0.5 in both positions.
TD,bTᴰ,ᵇ
Threshold map.
≈≈
Approximation.

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.coefficient = 2

Initial values in code

  • threshold = 0.5

Calculated here

Result expression: { phi, x, estimate, differences: estimate.map((v, i) => v - phi[i]) }

  • phi = [input.coefficient, 0] Uses: input.coefficient
  • x = [...phi] Uses: phi
  • estimate = x.map((v) => Math.max(0, v - threshold) - Math.max(0, -v - threshold)) Uses: x, threshold

Returns

Example result
phi
array (2 items): [2, 0]
x
array (2 items): [2, 0]
estimate
array (2 items): [1.5, 0]
differences
array (2 items): [-0.5, 0]

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

Result

Enable JavaScript to run this example.

Technical statement

The invented signal has x = Dφ and D is the 2 by 2 identity. This example shows the actual approximation error.

Source: Source expression