Approximation risk and function distance
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.
Generalization and risk bounds · Relate sample behavior to population risk under stated 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: 1.2 Learning from examples
Compare excess risk, the best squared L² distance, and the squared uniform distance.
This example makes the source statement computable on a finite model.
Source formula example
illustration · The finite example does not establish the identity for all regression distributions.
Symbols
- Bayes regression risk.
- Bayes conditional-mean predictor.
- Best predictor in F.
- Input distribution.
- Mean-square and essential-supremum function norms.
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.
Initial values in code
target=[0, 2]candidates=[0, 1]
Calculated here
Result expression: {
risks,
best,
approximationRisk: Math.min(...risks),
l2Squared: differences.reduce((s, v) => s + v * v, 0) / 2,
infinitySquared: Math.max(...differences.map(Math.abs)) ** 2,
}
risks=candidates.map(risk)Uses:candidates,riskbest=candidates[risks.indexOf(Math.min(...risks))]Uses:candidates,risksdifferences=target.map((y) => best - y)Uses:target,best
Returns
risks- array (2 items): [2, 1]
best- 1
approximationRisk- 1
l2Squared- 1
infinitySquared- 1
Read numbers from input and return the result. JavaScript basics.
Result
Technical statement
The toy distribution is uniform on two inputs with deterministic targets [0,2], and F contains the constants 0 and 1. Thus Bayes risk is zero, the best class risk is 1, and both norm squares are 1. The source assumes squared-loss regression and a minimizer in the class.
Source: Source expression