Downsampling a grid
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.
Convolution · Describe shared filters and downsampling.
Convolution, recurrent and residual architectures are not part of this linear penguin model.
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: 6.1 Looking locally
Select every other row and column using one-based odd positions. JavaScript arrays use zero-based positions.
A pooling step can reduce the number of positions.
Source formula example
exact · The result is exact for these finite toy inputs, apart from ordinary computer rounding.
Symbols
- The downsampling map.
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.
Initial values in code
grid=[ [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16], ]
Calculated here
Result expression: grid
.filter((_, i) => i % 2 === 0)
.map((row) => row.filter((_, j) => j % 2 === 0))
Returns
Some runtime paths or values are not resolved here.
Read numbers from input and return the result. JavaScript basics.
Result
Technical statement
This toy uses a 4-by-4 grid and produces a 2-by-2 grid. This particular operation selects values; it does not average them.
Source: Source expression