dynode.utils.splines.base_equation#
- dynode.utils.splines.base_equation(t: Array | ndarray | bool | number | bool | int | float | complex, coefficients: Array) Array #
Compute the base of a spline equation without knots.
Follows a simple cubic formula: a + bt + ct^2 + dt^3. This is a vectorized version that takes in a matrix of coefficients for each age x vaccination combination.
Parameters#
- tjax.ArrayLike
Simulation day.
- coefficientsjnp.ndarray
Coefficients of each cubic spline base equation for all combinations of age bin and vaccination history. Shape: (NUM_AGE_GROUPS, MAX_VACCINATION_COUNT + 1, 4)
Returns#
- jnp.ndarray
The result of executing the base equation a + bt + ct^2 + dt^3 for each age group and vaccination count combination. Shape: (NUM_AGE_GROUPS, MAX_VACCINATION_COUNT + 1)