The source figure’s network
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.
Prediction rules and layers · Describe or apply prediction rules, layers and parameters.
The project uses a linear rule with two features. The fitted weights produce scores or normalized mass.
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: 1.2 Learning from examples · 3.3 Other ways to measure possibility
The source figure has 3 inputs, hidden layers of widths 4 and 6, and 1 output. Every layer has a weight matrix and a bias vector.
The first layer has 16 parameters, the second 30, and the output layer 7, for a total of 53.
Shapes determine how the network’s layer operations fit together.
Source formula example
illustration · The architecture matches the source figure. The numerical weights, biases and input are invented for this demonstration.
Symbols
- Layer widths [3,4,6,1].
- Weights with one row per unit and one column per previous-layer value.
- One bias for each output of the layer.
- Preactivation of unit i in layer ℓ.
- The corresponding activated value.
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.x= 1
Initial values in code
widths=[3, 4, 6, 1]
Calculated here
Result expression: {
x,
widths,
counts,
total: counts.reduce((a, b) => a + b, 0),
firstPre,
first,
secondPre,
second,
output,
}
x=[input.x, 0, 0]Uses:input.xmatrices=widths .slice(1) .map((rows, i) => Array.from({ length: rows }, (_, r) => Array.from({ length: widths[i] }, (_, c) => (r === 0 && c === 0 ? 1 : 0)), ), )Uses:widthsbiases=widths.slice(1).map((size) => Array(size).fill(0))Uses:widthsfirstPre=affine(matrices[0], biases[0], x)Uses:affine,matrices,biases,xfirst=firstPre.map((value) => Math.max(0, value))Uses:firstPresecondPre=affine(matrices[1], biases[1], first)Uses:affine,matrices,biases,firstsecond=secondPre.map((value) => Math.max(0, value))Uses:secondPreoutput=affine(matrices[2], biases[2], second)Uses:affine,matrices,biases,second
More expressions in code
Returns
x- array (3 items): [1, 0, 0]
widths- array (4 items): [3, 4, 6, 1]
counts- array (3 items): [16, 30, 7]
total- 53
firstPre- array (4 items): [1, 0, 0, 0]
first- array (4 items): [1, 0, 0, 0]
secondPre- array (6 items): [1, 0, 0, 0, …]
second- array (6 items): [1, 0, 0, 0, …]
Read numbers from input and return the result. JavaScript basics.
Result
Technical statement
For each layer, multiply the previous values by W and add b. ReLU is applied to hidden preactivations in the toy. The source’s 53 parameters include zero-valued weights and biases; the count depends on available positions, not which positions are nonzero.
Source: Source expression