diffsvg.pp.spline_basis_at#

diffsvg.pp.spline_basis_at(binned, x)#

Evaluate the spline basis of binned at new anchor values.

Same knots, boundary knots and centring as binned.B/binned.B_pred, so coefficients fitted on this basis are valid on the prediction grid and vice versa. Used to fit on single cells (use_binned=False).

Parameters:
binned

A BinnedData, i.e. the output of bin_obs.

x

Anchor values in [0, 1], without missing values.

Returns:

numpy.ndarray Design matrix of shape (len(x), binned.n_bsplines).