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
illustration · The approximation quality and support recovery depend on dictionary, sparsity, and threshold conditions; this example does not establish them.
Symbols
- Coefficient vector.
- Dictionary; the toy uses the identity.
- Threshold vector; the toy uses 0.5 in both positions.
- 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
Code changed. Reset to restore 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.coefficientx=[...phi]Uses:phiestimate=x.map((v) => Math.max(0, v - threshold) - Math.max(0, -v - threshold))Uses:x,threshold
Returns
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
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