A weighted generalization bound
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.3 Does it work on new examples?
The left side is the difference between population risk and sample risk. The right side is a bound for a rule with positive weight p(f).
This theorem relates sample size, confidence, and prior weight to a risk bound.
Source formula example
illustration · The code calculates the bound for a supplied positive weight. It does not calculate population risk or prove the probabilistic statement.
Symbols
- Prior probability assigned to rule f, chosen before seeing the sample.
- Failure probability in (0,1).
- Positive integer number of training examples.
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.weight= 0.5input.delta= 0.5input.m= 4
Calculated here
Result expression: {
upperBound: Math.sqrt((Math.log(1 / weight) + Math.log(2 / delta)) / (2 * m)),
}
weight=input.weightUses:input.weightdelta=input.deltaUses:input.deltam=input.mUses:input.m
Returns
upperBound- ≈0.5098
Read numbers from input and return the result. JavaScript basics.
Result
Technical statement
The theorem assumes a countable hypothesis class, a probability distribution p on that class, loss in [0,1] almost surely for each rule, and independent identically distributed training examples. With probability at least 1−δ over the sample, the bound holds simultaneously for every rule. A zero prior weight gives no finite bound; this calculator requires a positive weight.
Source: Source expression