Rademacher complexity on a finite 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: 1.2 Learning from examples
Multiply each function value by an independent random sign, average, take the largest absolute result over the function class, then average over the random choices.
Here both examples are the same fixed point and the two functions return 1 and 0 there. We enumerate all four equally likely pairs of signs.
This measures how strongly a function class can match random signs.
Source formula example
exact · The fixed sample corresponds to a degenerate sample distribution; all sign pairs and both toy functions are enumerated exactly. A finite sample or finite list of functions does not generally give the supremum or expectation for another distribution or function class.
Symbols
- Independent random sign taking −1 or +1 with equal probability.
- Class of real-valued functions.
- Random examples; fixed in this toy.
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.scale= 1
Initial values in code
signs=[ [-1, -1], [-1, 1], [1, -1], [1, 1], ]
Calculated here
Result expression: { maxima, expectation: maxima.reduce((a, b) => a + b, 0) / maxima.length }
functions=[ [input.scale, input.scale], [0, 0], ]Uses:input.scalemaxima=signs.map((pair) => Math.max( ...functions.map((values) => Math.abs(values.reduce((sum, value, i) => sum + value * pair[i], 0) / 2), ), ), )Uses:signs,functions
Returns
maxima- array (4 items): [1, 0, 0, 1]
expectation- 0.5
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: Source expression