Fit every training point
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.
Risk and assessment · Distinguish loss on a sample from expected loss.
The fitted rule is evaluated on 102 held-out observations, not used for fitting.
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.2 Can the network express the answer?
A network interpolates a sample when its prediction equals each target.
This example makes the source statement computable on a finite model.
Source formula example
illustration · This finite fit is not the general source interpolation existence proof.
Symbols
- Network with architecture a.
- First- and second-layer parameters.
- Training inputs and targets.
- Number of examples.
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.weight= 1
Initial values in code
xs=[1, 2]ys=[1, 2]
Calculated here
Result expression: { predictions, targets: ys, allMatch: predictions.every((v, i) => v === ys[i]) }
predictions=xs.map((x) => input.weight * Math.max(0, x))Uses:xs,input.weight
Returns
predictions- array (2 items): [1, 2]
targets- array (2 items): [1, 2]
allMatch- true
Read numbers from input and return the result. JavaScript basics.
Result
Technical statement
A single ReLU unit with first-layer weight 1 and bias 0 fits the two invented positive inputs when its output weight is 1.
Source: Source expression