Matrix times vector
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.
Vectors and matrices · Combine numbers using vector and matrix operations.
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: [≈1.618, ≈0.5127, ≈-2.131]
Project operation
The project calculation uses these records; the source formula and example follow below. Code edits run locally; project settings travel between pages.
Features → Project operation → Prediction
Project input
Showing first three entries; the operation receives the complete array. Rounded preview; the operation uses full precision.
Result
[≈1.618, ≈0.5127, ≈-2.131]
Teaching example; no specific paper passage attached.
A matrix is a grid. Each output entry is the dot product of one row with the input vector.
This is a basic operation in neural networks.
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= 1
Initial values in code
matrix=[ [1, 2], [3, 4], ]
Calculated here
Result expression: matrix.map((row) => row.reduce((sum, value, i) => sum + value * x[i], 0))
x=[input.x, 1]Uses:input.x
Returns
Some runtime paths or values are not resolved here.
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