incline.SiZer¶
- class incline.SiZer(smoother=<factory>, scales=None, n_scales=20, scale_range=(0.02, 0.5), confidence_level=0.95, noise=None, simultaneous=True, n_bootstrap=200, random_state=None)[source]¶
A scale sweep over a smoother with an explicit scale knob.
- Variables:
smoother (Smoother) – The estimator to sweep. It must implement a real smoothing scale; naive differencing and state-space models do not. Its uncertainty machinery is what the map rests on, so prefer one with an exact operator.
scales (npt.NDArray[np.float64] | None) – Explicit scales. Generated log-spaced when None.
n_scales (int) – How many scales to generate.
scale_range (tuple[float, float]) – Smallest and largest scale, as fractions of the span.
confidence_level (float) – Confidence level for the flags.
noise (NoiseModel | str | None) – Noise model instance passed to the smoother, or
'iid','ar1', or'heteroskedastic'.simultaneous (bool) – Ask for a whole-curve band at each scale rather than pointwise intervals. See the note on multiplicity below.
n_bootstrap (int) – Bootstrap replicates for nonlinear smoothers.
random_state (int | np.random.Generator | None) – Seed or Generator controlling every bootstrap in the sweep.
- Parameters:
Note
With
simultaneous=Trueeach row of the map is corrected for testing every x at that scale. It is not corrected jointly across scales as well, because neighboring scales are so strongly dependent that treating them as separate tests would be far too conservative. Reading a single cell in isolation therefore still overstates confidence; reading persistence across scales, which is whatSiZerMap.significant_regions()does, is the intended use.Only smoothers with an exact operator support the whole-curve band. Requesting one from another smoother raises rather than silently changing the inferential target.
- __init__(smoother=<factory>, scales=None, n_scales=20, scale_range=(0.02, 0.5), confidence_level=0.95, noise=None, simultaneous=True, n_bootstrap=200, random_state=None)¶
Methods
__init__([smoother, scales, n_scales, ...])fit(df[, value_column, time_column])Sweep the smoother across scales.
Attributes
- noise: NoiseModel | str | None = None¶
- fit(df, value_column='value', time_column=None)[source]¶
Sweep the smoother across scales.
- Parameters:
- Returns:
The assembled map.
- Raises:
ValueError – If fewer than five usable observations remain or the smoother has no scale knob.
- Return type: