captest.capdata.CapData.fit_regression

CapData.fit_regression(filter=False, summary=True, custom_name=None)

Perform a regression with statsmodels on the filtered data.

Parameters:
  • filter (bool, default False) – When True, removes timestamps whose residuals exceed two standard deviations (recorded as a Regression step). regression_results is not updated in this case; call fit_regression(filter=False) afterwards to store the final fit. When False, just fits ordinary least squares and stores the result in regression_results.

  • summary (bool, default True) – Set False to suppress printing the regression summary.

  • custom_name (str, default None) – Optional display label for the recorded filter step. Only has an effect when filter=True; the filter=False path records no step, so the label is ignored.