adelie.diagnostic.residuals#

adelie.diagnostic.residuals(glm: GlmBase32 | GlmBase64 | GlmMultiBase32 | GlmMultiBase64, etas: ndarray)[source]#

Computes the residuals.

The residual is given by

\[\begin{align*} \hat{r} = -\nabla \ell(\eta) \end{align*}\]
Parameters:
glmUnion[GlmBase32, GlmBase64, GlmMultiBase32, GlmMultiBase64]

GLM object. It is typically one of the GLM classes defined in adelie.glm submodule.

etas(L, n) or (L, n, K) ndarray

Linear predictions.

Returns:
resids(L, n) or (L, n, K) ndarray

Residuals.