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)[source]¶
A scale sweep over any smoother.
- Variables:
smoother (Smoother) – The estimator to sweep. 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 passed to the smoother, or
'iid'/'ar1'.simultaneous (bool) – Ask for a whole-curve band at each scale rather than pointwise intervals. See the note on multiplicity below.
- 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. For a bootstrapped smoother the request is dropped and the map records
simultaneous=Falserather than claiming a correction it did not make.- __init__(smoother=<factory>, scales=None, n_scales=20, scale_range=(0.02, 0.5), confidence_level=0.95, noise=None, simultaneous=True)¶
Methods
__init__([smoother, scales, n_scales, ...])fit(df[, column_value, time_column])Sweep the smoother across scales.
Attributes
- noise: NoiseModel | str | None = None¶
- fit(df, column_value='value', time_column=None)[source]¶
Sweep the smoother across scales.
- Parameters:
- Returns:
The assembled map.
- Raises:
ValueError – If fewer than five usable observations remain.
- Return type: