adelie.glm.gaussian#
- adelie.glm.gaussian(y: ndarray, *, weights: ndarray | None = None, dtype: float32 | float64 | None = None, opt: bool = True)[source]#
Creates a Gaussian GLM family object.
The Gaussian GLM family specifies the loss function as:
\[\begin{align*} \ell(\eta) = \sum\limits_{i=1}^n w_i \left( -y_i \eta_i + \frac{\eta_i^2}{2} \right) \end{align*}\]The link function is given by
\[\begin{align*} g(\mu)_i &= \mu_i \end{align*}\]- Parameters:
- y(n,) ndarray
Response vector \(y\).
- weights(n,) ndarray, optional
Observation weights \(W\). Weights are normalized such that they sum to
1. Default isNone, in which case, it is set tonp.full(n, 1/n).- dtypeUnion[float32, float64], optional
The underlying data type. If
None, it is inferred fromy, in which caseymust have an underlying data type ofnumpy.float32ornumpy.float64. Default isNone.- optbool, optional
If
True, an optimized routine is used when passed intoadelie.solver.grpnet(). Otherwise, a general routine with IRLS is used. This flag is mainly for developers for testing purposes. We advise users to use the default value. Default isTrue.
- Returns:
- glm
Gaussian GLM object.