Sparse hierarchy
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
At each level a dictionary transforms a sparse coefficient vector into the vector at the previous level.
These computations organize features and sparse coefficients.
Source formula example
illustration · This finite hierarchy satisfies the displayed relations for the chosen values, without proving coefficient recovery.
Symbols
- Dictionary matrix at layer ℓ.
- Coefficient vector at layer ℓ.
- Upper bound on local nonzero count.
- Positive number of layers.
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.value= 2
Initial values in code
D1=[ [1, 0], [0, 1], ]D2=[ [1, 0], [0, 1], ]
Calculated here
Result expression: {
D1,
D2,
deep,
middle,
data,
deepLocalSparsity: localCount(deep),
middleLocalSparsity: localCount(middle),
bound: 1,
}
deep=[input.value, 0]Uses:input.valuemiddle=multiply(D2, deep)Uses:multiply,D2,deepdata=multiply(D1, middle)Uses:multiply,D1,middle
Returns
deep- array (2 items): [2, 0]
middle- array (2 items): [2, 0]
data- array (2 items): [2, 0]
deepLocalSparsity- 1
middleLocalSparsity- 1
bound- 1
D1- array (2 items): [array (2 items): [1, 0], array (2 items): [0, 1]]
D2- array (2 items): [array (2 items): [1, 0], array (2 items): [0, 1]]
Read numbers from input and return the result. JavaScript basics.
Result
Technical statement
The two toy dictionaries are 2 by 2 matrices, there is one channel, two circular positions, and n₁ = n₂ = 1, so each local window has one entry. Both layers satisfy the chosen sparsity bound k₁ = k₂ = 1. Both dictionaries are identity matrices, representing delta-filter circular convolutions with window length 1 < 2 positions.
Source: Source expression