Weighted and Fourier errors
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: 3.1 A rule based on distance
The source first rewrites a weighted error using the square root of the probability density. It then uses Fourier energy preservation.
The toy has two equally weighted points and uses a normalized two-point discrete Fourier transform.
The frequency-domain error can reveal which functions are difficult to approximate.
Source formula example
illustration · The example uses a normalized finite discrete transform. It does not prove the continuous Plancherel theorem or the depth-separation result.
Symbols
- A measure with density φ² in the source argument.
- Square root of the probability density.
- Fourier transform of 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
Code changed. Reset to restore this example’s data flow.
You choose
input.first= 2
Initial values in code
probabilities=[0.5, 0.5]
Calculated here
Result expression: {
weightedError,
spatialError: transformedInput.reduce((sum, value) => sum + value ** 2, 0),
fourier,
frequencyError: fourier.reduce((sum, value) => sum + value ** 2, 0),
}
difference=[input.first, 0]Uses:input.firstweightedError=difference.reduce( (sum, value, i) => sum + probabilities[i] * value ** 2, 0, )Uses:difference,probabilitiestransformedInput=difference.map( (value, i) => value * Math.sqrt(probabilities[i]), )Uses:difference,probabilitiesfourier=[ (transformedInput[0] + transformedInput[1]) / Math.sqrt(2), (transformedInput[0] - transformedInput[1]) / Math.sqrt(2), ]Uses:transformedInput
Returns
weightedError- 2
spatialError- 2
fourier- array (2 items): [1, 1]
frequencyError- 2
Read numbers from input and return the result. JavaScript basics.
Result
Technical statement
The source assumes the functions and square root of the density are sufficiently well behaved for the integrals and Plancherel identity. The toy checks the corresponding finite energy identity; its two-point transform is not the continuous Fourier transform.
Source: Source expression