segreg.model.one_bkpt_rss_func

one_bkpt_rss_func(indep, dep)

Returns a function which takes a bkpt and returns the RSS of a one-bkpt segmented fit.

The returned function takes a single argument which is interpreted as a bkpt location. Given a bkpt, it computes the RSS of a one-bkpt segmented fit to the given data for the specified bkpt. In particular, there is no estimation of the bkpt involved.

This method is intended to be used primarily for plotting or diagnosis of one-bkpt segmented regression problems.

Notes

For one-bkpt segmented regression problems, estimation of the bkpt is equivalent to minimization of the returned function.

Parameters
  • indep (array-like of shape (num_data,)) – The independent data. Also called predictor, explanatory variable, regressor, or exogenous variable.

  • dep (array-like of shape (num_data,)) – The dependent data. Also called response, regressand, or endogenous variable.

Returns

func

Return type

a function object