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 withinn_stdresidual standard deviations. The fitted statsmodels result is exposed onself.regression_modelafter_executeso 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
nameis omitted).Attributes
args_reprRender the step's params for the summary.
custom_nameexplanationHuman-readable description of the step's effect (read after run()).
n_stdnameparam