The Modern Mathematics of Deep Learningexplained for non-mathematicians

A sampling error 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.

Approximation and depth · Study approximation error and network size under stated conditions.

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: 4.2 Approximating with random pieces

The left side is an expected squared function error. The source bounds it using a constant Cg and the number of independent samples n.

This inequality is a step toward an inverse-square-root approximation rate.

Source formula example

E[∥g−g(0)−Cgn∑i=1nΓ(Ξ(i),Ξ~(i))∥L2(μ)2]=∫B1(0)V[Cgn∑i=1nΓ(Ξ(i),Ξ~(i))(x)] dμ(x)=Cg2∫B1(0)V[Γ(Ξ,Ξ~)(x)] dμ(x)n≤(2πCg)2n,\begin{split}{\mathbbm{E}}\left[\Big\|g-g(0)-\frac{C_{g}}{n}\sum_{i=1}^{n}\Gamma(\Xi^{(i)},\widetilde{\Xi}^{(i)})\Big\|_{L^{2}(\mu)}^{2}\right]&=\int_{B_{1}(0)}{\mathbbm{V}}\left[\frac{C_{g}}{n}\sum_{i=1}^{n}\Gamma(\Xi^{(i)},\widetilde{\Xi}^{(i)})(x)\right]\,\mathrm{d}\mu(x)\\ &=\frac{C_{g}^{2}\int_{B_{1}(0)}{\mathbbm{V}}\big[\Gamma(\Xi,\widetilde{\Xi})(x)\big]\,\mathrm{d}\mu(x)}{n}\leq\frac{(2\pi C_{g})^{2}}{n},\end{split}

illustration · The code evaluates the right side conditional on the representation used in the derivation. The printed representation has a normalization issue; see the counterexample lesson. It does not calculate the expectation or prove the inequality.

Symbols

CgC_g
The finite Fourier-moment constant in Theorem 4.1.
nn
A positive integer number of samples.
ΓΓ
The random threshold feature described in the source.

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.Cg = 1
  • input.n = 4

Calculated here

Result expression: { upperBound: (2 * Math.PI * input.Cg) ** 2 / input.n }

Returns

Example result
upperBound
≈9.87

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

Result

Enable JavaScript to run this example.

Technical statement

The source uses independent identically distributed feature samples, a probability measure μ supported on the unit ball, and the Fourier-regularity assumptions of the source theorem. The equality before the bound expresses the expected squared L² error as an integrated variance. The upper bound is derived using the unit-ball frequency inequality.

Source: Source expression