A shallow 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: 5.1 The shape of training loss · 5.2 When parameters move only a little
Each unit applies ReLU to a weighted input plus bias. The output adds the weighted unit outputs.
These quantities connect network parameters to loss and optimization.
Source formula example
illustration · The invented finite inputs illustrate this expression. They do not prove a general identity, bound, or existence claim.
Symbols
- Input vector in ℝᵈ; the toy uses one coordinate.
- All first-layer and output weights, including hidden biases.
- Number of hidden units.
- Activation function; the toy uses ReLU.
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
hiddenWeights=[ [1, 1], [-1, 1], ]outputWeights=[2, -1]
Calculated here
Result expression: {
hiddenWeights,
outputWeights,
features,
output: outputWeights.reduce((sum, w, i) => sum + w * features[i], 0),
}
x=input.xUses:input.xfeatures=hiddenWeights.map(([w, b]) => Math.max(0, w * x + b))Uses:hiddenWeights,x
Returns
hiddenWeights- array (2 items): [array (2 items): [1, 1], array (2 items): [-1, 1]]
outputWeights- array (2 items): [2, -1]
features- array (2 items): [2, 0]
output- 4
Read numbers from input and return the result. JavaScript basics.
Result
Technical statement
The example has one input and two hidden units. The first-layer weights and biases are fixed; the output weights are 2 and −1.
Source: Source expression