Vector length
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.
Norms and distances · Measure size or difference in a specified space.
Project vectors have two features; the training matrix has n rows and two columns. Mathematical tools may operate on these values when their assumptions apply.
Project operation
Output: ≈4.309
Project operation
The project calculation uses these records; the source formula and example follow below. Code edits run locally; project settings travel between pages.
Objective → Project operation → Project operation
Project input
Showing first three entries; the operation receives the complete array. Rounded preview; the operation uses full precision.
input.vector· Features[≈-0.2895, ≈-2.052, ≈-1.016] … (9 entries)input.p· Project settings or constant2
Result
≈4.309
Teaching example; no specific paper passage attached.
Square each entry, add the squares, then take the square root.
A norm measures the size of a vector.
Source formula example
exact · The result is exact for these finite toy inputs, apart from ordinary computer rounding.
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= 3
Calculated here
Result expression: { squared, norm: Math.sqrt(squared.reduce((a, b) => a + b, 0)) }
x=[input.x, 4]Uses:input.xsquared=x.map((value) => value * value)Uses:x
Returns
squared- array (2 items): [9, 16]
norm- 5
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: Teaching example