Numerical experiment
Positive and Fourier kernel sketches
Each square shows a function of two scalar inputs, x and y: the exact kernel exp(−|x−y|p), a positive-feature sketch, and a random Fourier sketch. Blue means negative; warm colors mean positive.
Computing the sketches…
Exact kernel
exp(−|x−y|p)
Positive-feature sketch
Nonnegative at every pair
Random Fourier sketch
Signed values are possible
One fixed linear color scale for all panels and settings.
Thin contours use the same levels in all three panels; the zero contour is dark and thicker. Both approximations are Gram matrices and are positive semidefinite, but only the positive-feature sketch guarantees nonnegative entries.
The slider uses 0.5 ≤ p ≤ 2; these representations are valid for 0 < p ≤ 2. The feature count doubles at each step, up to 65,536 per sketch. Large counts may take a moment to compute. A fixed seed and nested sample prefixes make comparisons reproducible; changing p reuses the same underlying draws. The positive features are the construction proved in the article, not a variance-controlled approximation. Their large fluctuations can persist even when r increases.
Statistics refer to the displayed 129 × 129 grid, not extrema over the whole square. Colors and contours interpolate that grid; very narrow peaks or rapid oscillations below its spacing may not be resolved. Numerical values are never clipped to the color range.