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=True each 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 what SiZerMap.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=False rather 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)
Parameters:
Return type:

None

Methods

__init__([smoother, scales, n_scales, ...])

fit(df[, column_value, time_column])

Sweep the smoother across scales.

Attributes

smoother: Smoother
scales: npt.NDArray[np.float64] | None = None
n_scales: int = 20
scale_range: tuple[float, float] = (0.02, 0.5)
confidence_level: float = 0.95
noise: NoiseModel | str | None = None
simultaneous: bool = True
fit(df, column_value='value', time_column=None)[source]

Sweep the smoother across scales.

Parameters:
  • df (DataFrame) – Time series data.

  • column_value (str) – Column holding the values.

  • time_column (str | None) – Numeric time column; the index is used when None.

Returns:

The assembled map.

Raises:

ValueError – If fewer than five usable observations remain.

Return type:

SiZerMap