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:
family:glmax.ExponentialDispersionFamilyinstance.params: fittedglmax.Params(for examplefitted.paramsfromglmax.fit).X: covariate matrix, shape(n, p).offset: optional offset vector added to the linear predictor.
Returns:
Predicted mean response vector
\(\hat{\mu} = g^{-1}(X \hat{\beta} + o)\), shape (n,).
Raises:
TypeError: iffamily,params, orXhave wrong types.