elbow_helper.smoothing module
Phase 2 — the smoothing scale-space.
Generates a grid of odd smoothing windows (always including 1 = no
smoothing) and applies a centered Gaussian smoother with reflected boundaries,
implemented in pure NumPy (no scipy.ndimage).
- elbow_helper.smoothing.smooth_curve(y, window, method='gaussian')[source]
Smooth
ywith a centered kernel and reflected boundaries.
- elbow_helper.smoothing.smoothing_grid(n, config)[source]
Odd smoothing windows for
nsamples, sorted ascending, deduplicated.- Parameters:
n (int) – Number of samples in the curve.
config (RobustKneeConfig) –
smoothing_fractionsare multiplied bynto size the windows.
- Returns:
Distinct odd window widths, always starting with
1.- Return type: