dynode.utils.splines.evaluate_cubic_spline

dynode.utils.splines.evaluate_cubic_spline#

dynode.utils.splines.evaluate_cubic_spline(t, knot_locations: Array, base_equations: Array, knot_coefficients: Array) Array#

Evaluate a cubic spline with knots and coefficients on day t.

Cubic spline equation age_bin x vaccination history combination: ``` f(t) = a + bt + ct^2 + dt^3 +

sum_{i}^{len(knot_locations)}(knot_coefficients[i] * (t - knot_locations[i])^3 * I(t > knot_locations[i]))

```

Parameters#

tjax.ArrayLike

Simulation day.

knot_locationsjnp.ndarray

Knot locations for all combinations of age bin and vaccination history. Shape: (NUM_AGE_GROUPS, MAX_VACCINATION_COUNT + 1, #knots)

base_equationsjnp.ndarray

Base equation coefficients (a + bt + ct^2 + dt^3) for all combinations of age bin and vaccination history. Shape: (NUM_AGE_GROUPS, MAX_VACCINATION_COUNT + 1, 4)

knot_coefficientsjnp.ndarray

Knot coefficients for all combinations of age bin and vaccination history. Shape: (NUM_AGE_GROUPS, MAX_VACCINATION_COUNT + 1, #knots)

Returns#

jnp.ndarray

Proportion of individuals in each age x vaccination combination vaccinated during this time step.