The Modern Mathematics of Deep Learningexplained for non-mathematicians

Shift and Fourier phase

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.

Signal transformations · Study signal transforms, scattering and their properties.

The project scales bill and flipper measurements using training-row means and scales; its feature vector has two entries.

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: 7.1 Features that stay steady

A shift multiplies the Fourier coefficient by a complex phase. The magnitude stays unchanged.

The phase identity explains translation invariance of Fourier magnitudes.

Source formula example

u(⋅−τ)^(ω)=e−2πi⟨τ,ω⟩u^(ω)\widehat{u(\cdot-\tau)}(\omega)=e^{-2\pi i\langle\tau,\omega\rangle}\hat{u}(\omega)

illustration · A discrete four-position case illustrates but does not prove the continuous identity.

Symbols

uu
Input signal.
ττ
Translation.
ωω
Frequency.
u^\hat{u}
Fourier transform.
ii
Imaginary unit.

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.shift = 1

Initial values in code

  • x = [1, 2, 0, 0]

Calculated here

Result expression: { original, moved, predicted }

  • shift = input.shift Uses: input.shift
  • shifted = x.map((_, i) => x[(i - shift + 4) % 4]) Uses: x, shift
  • original = coefficient(x) Uses: coefficient, x
  • moved = coefficient(shifted) Uses: coefficient, shifted
  • phase = (-2 * Math.PI * shift) / 4 Uses: shift
  • predicted = [ original[0] * Math.cos(phase) - original[1] * Math.sin(phase), original[0] * Math.sin(phase) + original[1] * Math.cos(phase), ] Uses: original, phase

Returns

Example result
original
array (2 items): [1, -2]
moved
array (2 items): [-2, -1]
predicted
array (2 items): [-2, -1]

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

Result

Enable JavaScript to run this example.

Technical statement

The finite circular example evaluates frequency 1 out of 4. Complex numbers are represented as [real, imaginary]. The source states the continuous Fourier transform identity.

Source: Source expression