captest.filters.AbsDiffPrev
- class captest.filters.AbsDiffPrev(*, column, threshold, custom_name, name)
Remove intervals with a large fractional change from the previous interval (a step-change / stability filter).
For column
cthe test isabs(c.diff() / c) <= threshold; intervals above the threshold are removed.columndefaults to the regression POA column when None. The first interval has an undefined difference (NaN) and is removed, matching the originalfilter_abs_perc_diff_prev_interval.- __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.
columncustom_nameexplanationHuman-readable description of the step's effect (read after run()).
nameparamthreshold