incline.SiZerMap

class incline.SiZerMap(axis, scales, derivative, se, significance, confidence_level, simultaneous, smoother_name)[source]

The result of a scale sweep.

Variables:
  • axis (incline.axis.TimeAxis) – The time axis every scale shares.

  • scales (numpy._typing._array_like.NDArray[numpy.float64]) – Smoothing scales, ascending, as fractions of the series span.

  • derivative (numpy._typing._array_like.NDArray[numpy.float64]) – Slope estimates, shape (n_scales, n_points).

  • se (numpy._typing._array_like.NDArray[numpy.float64]) – Standard errors, same shape.

  • significance (numpy._typing._array_like.NDArray[numpy.int64]) – -1, 0 or +1 per cell, same shape.

  • confidence_level (float) – Confidence level behind the flags.

  • simultaneous (bool) – Whether each row’s flags carry a whole-curve correction.

  • smoother_name (str) – Which estimator produced the sweep.

Parameters:
  • axis (TimeAxis)

  • scales (NDArray[float64])

  • derivative (NDArray[float64])

  • se (NDArray[float64])

  • significance (NDArray[int64])

  • confidence_level (float)

  • simultaneous (bool)

  • smoother_name (str)

__init__(axis, scales, derivative, se, significance, confidence_level, simultaneous, smoother_name)
Parameters:
  • axis (TimeAxis)

  • scales (NDArray[float64])

  • derivative (NDArray[float64])

  • se (NDArray[float64])

  • significance (NDArray[int64])

  • confidence_level (float)

  • simultaneous (bool)

  • smoother_name (str)

Return type:

None

Methods

__init__(axis, scales, derivative, se, ...)

plot([figsize, title])

Draw the significance map, scale against position.

significant_regions([min_persistence])

Find x-intervals whose sign holds across several consecutive scales.

to_frame()

Render the sweep as one row per (scale, point).

Attributes

axis: TimeAxis
scales: NDArray[float64]
derivative: NDArray[float64]
se: NDArray[float64]
significance: NDArray[int64]
confidence_level: float
simultaneous: bool
smoother_name: str
to_frame()[source]

Render the sweep as one row per (scale, point).

Returns:

Long-format frame with x, scale, derivative, derivative_se and significance.

Return type:

DataFrame

significant_regions(min_persistence=3)[source]

Find x-intervals whose sign holds across several consecutive scales.

Persistence across scales is the whole idea: a feature visible only at one bandwidth is a property of that bandwidth.

Parameters:

min_persistence (int) – How many consecutive scales must agree.

Returns:

{'increasing': [(start, end), ...], 'decreasing': [...]}.

Return type:

dict[str, list[tuple[float, float]]]

plot(figsize=(12, 8), title=None)[source]

Draw the significance map, scale against position.

Parameters:
  • figsize (tuple[float, float]) – Figure size in inches.

  • title (str | None) – Overrides the default title.

Returns:

The matplotlib figure.

Raises:

ImportError – If matplotlib is unavailable.

Return type:

Figure