Projected normalized gradient
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.
Optimization theory · Study convergence and loss geometry under assumptions.
The project supplies finite observations and fitted parameters. A held-out sample does not establish population bounds or prove a theorem.
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: 2.3 The path matters
Normalize the parameter vector, form the projection matrix, multiply by the smoothed-margin gradient, and divide by the parameter norm.
For one example x=(1,0), y=1 and exponential loss, rβ(θ)=θ₁, so its gradient is (1,0).
The projected update describes changes in parameter direction.
Source formula example
illustration · This evaluates one projected vector field. It does not integrate the trajectory or prove general maximum-margin convergence.
Symbols
- Nonzero parameter norm.
- Parameter vector divided by its norm.
- Matrix projecting onto directions orthogonal to the unit parameter vector.
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.u= 3input.v= 4
Initial values in code
gradient=[1, 0]
Calculated here
Result expression: { beta, normalized, projection, gradient, rate }
theta=[input.u, input.v]Uses:input.u,input.vbeta=Math.hypot(...theta)Uses:thetanormalized=theta.map((value) => value / beta)Uses:theta,betaprojection=normalized.map((value, i) => normalized.map((other, j) => (i === j ? 1 : 0) - value * other), )Uses:normalizedrate=projection.map( (row) => row.reduce((sum, value, i) => sum + value * gradient[i], 0) / beta, )Uses:projection,gradient,beta
Returns
beta- 5
normalized- array (2 items): [0.6, 0.8]
projection- array (2 items): [array (2 items): [0.64, -0.48], array (2 items): [-0.48, 0.36]]
gradient- array (2 items): [1, 0]
rate- array (2 items): [0.128, -0.096]
Read numbers from input and return the result. JavaScript basics.
Result
Technical statement
The source derives the evolution by the chain rule for normalized nonzero parameters. The chosen one-sample exponential loss has smoothed margin equal to the first parameter coordinate; hence the gradient is exactly (1,0).
Source: Source expression