regression
Module Contents
Classes
- class regression.CCS_regressor(N=100, xmin=0, xmax=1, dx=None, sw=False, eps=False)
- merge_intervals(x)
- rubber_band()
- static solver(pp, qq, gg, hh, aa, bb, maxiter=300, tol=(1e-10, 1e-10, 1e-10))
The solver for the objective.
- Parameters:
pp (matrix) – P matrix as per standard Quadratic Programming(QP) notation.
qq (matrix) – q matrix as per standard QP notation.
gg (matrix) – G matrix as per standard QP notation.
hh (matrix) – h matrix as per standard QP notation
aa (matrix) – A matrix as per standard QP notation.
bb (matrix) – b matrix as per standard QP notation
maxiter (int, optional) – maximum iteration steps (default: 300).
tol (tuple, optional) – tolerance value of the solution (default: (1e-10, 1e-10, 1e-10)).
- Returns:
dictionary containing solution details
- Return type:
sol (dict)
- fit(x, y)
- const(n_switch)
- predict(x)
- spline_construction(N)
This function constructs the matrices A, B, C, D.
- Parameters:
N – Number of knots
- Returns:
constructed matrices
- Return type:
cc, dd, bb, aa (matrices)
- model(x)
Constructs the v matrix.
- Parameters:
self –
- Returns:
The v matrix for a pair.
- Return type:
ndarray