A margin-bound example
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: 2.2 Weight size and room to decide
Compare classification risk and surrogate loss, then evaluate the known sample-margin and concentration terms.
A margin bound relates observed training margins to population classification risk.
Source formula example
illustration · The singleton class is a finite restriction, not the full network hypothesis class. This check does not establish the source high-probability bound.
Symbols
- Classifier score function.
- Positive margin threshold.
- Failure probability in (0,1).
- Rademacher complexity.
- Signed margin Yf(X).
- Inequality up to an unspecified constant.
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.delta= 0.25
Initial values in code
gamma=0.5margin=1classificationRisk=0surrogateLoss=0signs=[-1, 1]
Calculated here
Result expression: {
classificationRisk,
surrogateLoss,
empiricalBelowMargin,
lossComplexity,
marginComplexity,
classComplexity,
contractionTerm,
concentration,
theoremConstants: null,
fullUpperBounds: null,
}
empiricalBelowMargin=margin < gamma ? 1 : 0Uses:margin,gammalossComplexity=complexity(surrogateLoss)Uses:complexity,surrogateLossmarginComplexity=complexity(margin)Uses:complexity,marginclassComplexity=complexity(1)Uses:complexitycontractionTerm=classComplexity / gammaUses:classComplexity,gammaconcentration=Math.sqrt(Math.log(1 / input.delta))Uses:input.delta
Returns
classificationRisk- 0
surrogateLoss- 0
empiricalBelowMargin- 0
lossComplexity- 0
marginComplexity- 1
classComplexity- 1
contractionTerm- 2
concentration- ≈1.177
Read numbers from input and return the result. JavaScript basics.
Result
Technical statement
The invented distribution has one atom (X,Y)=(1,1); the toy class contains only f(x)=1, and m=1. The margin is 1, γ=1/2, and both classification risk and surrogate loss are zero. Under the source absolute-value definition, the zero-loss class has Rademacher complexity 0, while the singleton margin and score classes each have complexity 1: for either random sign, the absolute signed value is 1. The score complexity divided by γ is 2. The source high-probability bound is uniform over its network class and uses unspecified positive constants; the complete numeric bounds therefore remain unavailable.
Source: Source expression