chaosmagpy.model_utils.colloc_matrix

chaosmagpy.model_utils.colloc_matrix(x, knots, order, deriv=None)[source]

Create collocation matrix of a univariate function on x in terms of a B-spline representation of order k.

The computation of the splines is based on the scipy-package.

Parameters:
xndarray, shape (N,)

N points to evaluate the B-spline at.

knotsndarray, shape >= (k+1,)

Vector of knots derived from breaks (with appropriate endpoint multiplicity).

orderint, positive

Order k of the B-spline (4 = cubic).

deriv: int, positive, optional

Derivative of the B-spline partition (defaults to 0).

Returns:
collmatndarray, shape (N, n-k)

Collocation matrix, n is the size of knots.

See also

augment_breaks