captest.filters.Regression

class captest.filters.Regression(*, n_std, custom_name, name)

Remove intervals whose regression residuals are statistical outliers.

Fits the CapData regression formula (capdata.regression_formula) to the regression columns and keeps only rows whose residual is within n_std residual standard deviations. The fitted statsmodels result is exposed on self.regression_model after _execute so callers (e.g. CapData.fit_regression) can print its summary.

__init__(**params)

Methods

__init__(**params)

from_config(config)

Build an instance from a to_config() dict.

run(capdata)

Execute the step, record runtime state, and append self to filters.

to_config()

Serialize this step to a config dict (every param, defaults included; the param-system name is omitted).

Attributes

args_repr

Render the step's params for the summary.

custom_name

explanation

Human-readable description of the step's effect (read after run()).

n_std

name

param