A fully connected 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.
Classification predicts three species; Ridge predicts body mass in grams using the same observations. These are separate models. Training predictions feed the objective; 102 separate test predictions never update the weights.
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.
Prediction
- Input
- Training: 12 × 2
- Output
- [Species: Adélie · Probabilities: [≈0.9945, ≈0.005412, ≈0.00005477], Species: Adélie · Probabilities: [≈0.6338, ≈0.3635, ≈0.002677], Species: Gentoo · Probabilities: [≈0.1023, ≈0.03028, ≈0.8674]] … (12 entries)
Project operation
The project calculation uses these records; the source formula and example follow below. Code edits run locally; project settings travel between pages.
Project input
Showing first three entries; the operation receives the complete array. Rounded preview; the operation uses full precision.
input.features· Features[[≈-1.946, ≈-1.283], [≈-0.6098, ≈-1.029], [≈-0.4454, ≈0.9162]] … (12 entries)input.weights· Model[≈-0.2895, ≈-2.052, ≈-1.016] … (9 entries)input.task· Project settings or constantclassificationinput.targetMean· Observationsnullinput.targetScale· Observationsnull
Result
[Species: Adélie · Probabilities: [≈0.9945, ≈0.005412, ≈0.00005477], Species: Adélie · Probabilities: [≈0.6338, ≈0.3635, ≈0.002677], Species: Gentoo · Probabilities: [≈0.1023, ≈0.03028, ≈0.8674]] … (12 entries)
Used in these source sections: 1.2 Learning from examples · 1.2.2 Can the network express the answer? · 2.1 A view through similarity · More source sections
Each layer multiplies its inputs by a weight matrix and adds biases. Apply an activation to hidden layers, then use the result as the next layer input.
These operations define the network prediction.
Source formula example
illustration · This uses one input, two hidden units, one output, and ReLU. Other networks have different matrices, biases, sizes, and activations.
Symbols
- Layer ℓ weight matrix with one row per output and one column per input.
- Layer ℓ bias vector.
- Activation applied to hidden-layer entries.
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
Calculated here
Result expression: { hiddenBefore, hidden, output }
x=input.xUses:input.xhiddenBefore=[2 * x + 1, -x]Uses:xhidden=hiddenBefore.map((value) => Math.max(0, value))Uses:hiddenBeforeoutput=hidden[0] + 2 * hidden[1]Uses:hidden
Returns
hiddenBefore- array (2 items): [3, -1]
hidden- array (2 items): [3, 0]
output- 3
Read numbers from input and return the result. JavaScript basics.
Result
Technical statement
Change the input and run the same code again. The displayed result uses the values shown above.
Source: Source expression