Interpolation with repeated tent functions
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.
Prediction rules and layers · Describe or apply prediction rules, layers and parameters.
The project uses a linear rule with two features. The fitted weights produce scores or normalized mass.
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.2 Simple pieces, many layers
Apply the tent function repeatedly. At each step divide the new value by 4 to the power of the step number, then add.
The source identifies this sum with the piecewise-linear interpolation of g(x) = x − x² on 2ⁿ + 1 equally spaced points.
Composition constructs increasingly detailed approximations.
Source formula example
approximation · This is the finite interpolant, which equals g at its grid points but generally differs elsewhere. Code limits n to six for the interactive example.
Symbols
- k-fold composition of the tent function h.
- Positive integer interpolation level.
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.x= 0.25input.n= 2
Initial values in code
total=0terms=[]
Calculated here
Result expression: {
terms,
gridPoints: 2 ** input.n + 1,
interpolated: total,
actual: input.x - input.x ** 2,
}
current=input.xUses:input.xfor (let k = 1; k <= input.n; k++) { current = h(current); const term = current / 4 ** k; terms.push(term); total += term; }Uses:input.n,current,h,terms,total
Returns
terms- array (2 items): [0.125, 0.0625]
gridPoints- 5
interpolated- 0.1875
actual- 0.1875
Some runtime paths or values are not resolved here.
Read numbers from input and return the result. JavaScript basics.
Result
Technical statement
The source uses 2ⁿ + 1 equally spaced points in [0,1]. The first interpolation I₀ is zero for g because g vanishes at both endpoints. Each displayed term is the increase from one interpolation level to the next.
Source: Source expression