segreg.model.OneBkptSegRegEstimator.get_func_for_params

OneBkptSegRegEstimator.get_func_for_params(params)[source]

Returns the regression model function defined by the given parameters.

Parameters

params (array-like) – First four elements should be: [u, v, m1, m2, …]. Any further elements in params are ignored. If restrict_rhs_slope has been set, then m2 will be ignored here.

More generally, if the model is of the form:

\[y = f(x; \theta) + \varepsilon\]

where \(f(x)\) is a function of x depending on the parameter vector \(\theta\), then this returns the function

\[f(x; \theta)\]

where \(\theta\) is passed to this function as params.

See also

model_function

Returns

func_for_params

Return type

function object