equidistant_knots()

equidistant_knots()#

liesel.contrib.splines.equidistant_knots(x, n_param, order=3, eps=0.01)[source]#

Create equidistant knots for a B-spline of the specified order.

Parameters:
  • x (Any) – A 1d array of input data.

  • order (int) – A positive integer giving the order of the spline function. A cubic spline has an order of 3. (default: 3)

  • n_param (int) – Number of parameters of the B-spline.

  • eps (float) – A factor by which the range of the interior knots is stretched. The range of interior knots will thus be eps * (jnp.max(x) - jnp.min(x)). (default: 0.01)

Return type:

Any

Returns:

A 1d array

Notes

Some additional info:

  • dim(knots) = n_params + order + 1

  • n_param = dim(knots) - order - 1

  • n_interior_knots = n_param - order + 1