The Modern Mathematics of Deep Learningexplained for non-mathematicians

VC generalization bound factor

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?

Evaluate the known square-root factor of a uniform generalization bound.

This example makes the source statement computable on a finite model.

Source formula example

sup⁡f∈F∣R(f)−R^S(f)∣≤cVCdim⁡(F)+log⁡(1/δ))m.\sup_{f\in{\mathcal{F}}}|{\mathcal{R}}(f)-\widehat{\mathcal{R}}_{S}(f)|\leq c\sqrt{\frac{\operatorname{VCdim}({\mathcal{F}})+\log(1/\delta))}{m}}.

illustration · The supremum and complete bound are not numerically evaluated; the code reports only the known factor.

Symbols

R(f),R^S(f)R(f),R̂S(f)
Population and empirical classification risks.
VCdim(F)VCdim(F)
Class VC dimension.
δδ
Failure probability in (0,1).
mm
Positive sample count.
cc
Unspecified positive theorem constant.
supsup
Least upper bound over the entire class F.

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

You choose

  • input.vc = 2
  • input.delta = 0.25
  • input.m = 16

Calculated here

Result expression: { factor, theoremConstant: null, upperBound: null }

  • factor = Math.sqrt((input.vc + Math.log(1 / input.delta)) / input.m) Uses: input.vc, input.delta, input.m

Returns

Example result
factor
≈0.46
theoremConstant
null
upperBound
null

Read numbers from input and return the result. JavaScript basics.

Result

Enable JavaScript to run this example.

Technical statement

the source theorem asserts existence of c > 0 such that for every classification task, data distribution, m, and δ in (0,1), the uniform inequality holds with probability at least 1−δ over independent training samples. The source does not give a numeric c.

Source: Source expression