Convolution and cross-correlation
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.
Frames and sparse signals · Encode or reconstruct signals with frames and dictionaries.
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: 6.3 Taking apart and rebuilding
An inner product with a convolved filter equals an inner product with the corresponding cross-correlation.
This calculation explains the corresponding source expression.
Source formula example
illustration · The numerical equality illustrates the finite cyclic identity; it does not prove the general framelet formula.
Symbols
- Signal on a finite cyclic group.
- Analysis vector.
- Zero-padded window filter.
- Circular convolution with padded filter.
- Cross-correlation.
- Euclidean inner product.
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
x=[1, 2, 3]u=[0, 1, 0]
Calculated here
Result expression: {
x,
u,
v,
conv,
correlation,
convolutionInner: dot(x, conv),
correlationInner: dot(u, correlation),
}
v=[input.first, 1, 0]Uses:input.firstconv=u.map((_, i) => u.reduce((s, z, j) => s + z * v[(i - j + 3) % 3], 0))Uses:u,vcorrelation=x.map((_, i) => v.reduce((s, z, j) => s + z * x[(i + j) % 3], 0))Uses:x,v
Returns
x- array (3 items): [1, 2, 3]
u- array (3 items): [0, 1, 0]
v- array (3 items): [2, 1, 0]
conv- array (3 items): [0, 2, 1]
correlation- array (3 items): [4, 7, 7]
convolutionInner- 7
correlationInner- 7
Read numbers from input and return the result. JavaScript basics.
Result
Technical statement
The toy uses three circular positions and a window of length 2 padded with one zero. It calculates both inner products and the full correlation vector.
Source: Source expression