Skip to content

Model Prediction¤

glmax.predict(...) applies a model specification and fitted parameters to data and returns mean predictions. The high-level philosophy is that prediction should stay explicit about both the model and the parameter carrier rather than hiding state inside a fitted object method.

glmax.predict(family: glmax.ExponentialDispersionFamily, params: glmax.Params, X: ArrayLike, *, offset: ArrayLike | None = None) -> jax.Array ¤

Apply a fitted family to new data and return predicted means.

This is the canonical predict grammar verb. It is @eqx.filter_jit-wrapped. Prediction computes \(\hat{\mu} = g^{-1}(X \hat{\beta} + o)\), where \(X\) is the design matrix, \(\hat{\beta}\) is the fitted coefficient vector, \(o\) is the optional offset, and \(g\) is the link function.

Arguments:

Returns:

Predicted mean response vector \(\hat{\mu} = g^{-1}(X \hat{\beta} + o)\), shape (n,).

Raises:

  • TypeError: if family, params, or X have wrong types.