Weight Functions¶
Kernel functions for distance weighting.
Overview¶
Weight functions (kernels) determine how neighboring points contribute to each local fit. Points closer to the target receive higher weights.
Available Kernels¶
| Kernel | Efficiency | Smoothness | Support |
|---|---|---|---|
| Tricube | 0.998 | Very smooth | Compact |
| Epanechnikov | 1.000 | Smooth | Compact |
| Gaussian | 0.961 | Infinite | Unbounded |
| Biweight | 0.995 | Very smooth | Compact |
| Cosine | 0.999 | Smooth | Compact |
| Triangle | 0.989 | Moderate | Compact |
| Uniform | 0.943 | None | Compact |
Efficiency = AMISE relative to Epanechnikov (1.0 = optimal)
Tricube (Default)¶
Cleveland's original choice. Best all-around performance.
Use when: Default choice for most applications.
Epanechnikov¶
Theoretically optimal for kernel density estimation.
Use when: Optimal MSE properties desired.
Gaussian¶
Infinitely smooth. No boundary effects.
Use when: Maximum smoothness needed, computational cost acceptable.
Biweight¶
Good balance of efficiency and smoothness.
Use when: Alternative to Tricube with slightly different properties.
Cosine¶
Smooth and computationally efficient.
Use when: Want smooth kernel with simple form.
Triangle¶
Simple linear taper.
Use when: Simple, interpretable weights.
Uniform¶
Equal weights within window. Fastest but least smooth.
Use when: Speed is critical, smoothness less important.
Choosing a Kernel¶
Recommendation
Stick with Tricube (default) unless you have specific requirements. The differences between kernels are usually small in practice.