adelie.glm.multigaussian#
- adelie.glm.multigaussian(y: ndarray, *, weights: ndarray | None = None, dtype: float32 | float64 | None = None, opt: bool = True)[source]#
Creates a MultiGaussian GLM family object.
The MultiGaussian GLM family specifies the loss function as:
\[\begin{align*} \ell(\eta) = \frac{1}{K} \sum\limits_{i=1}^n w_{i} \left( -\sum\limits_{k=1}^K y_{ik} \eta_{ik} +\frac{\|\eta_{i\cdot}\|^2}{2} \right) \end{align*}\]The link function is given by
\[\begin{align*} g(\mu)_{ik} &= \mu_{ik} \end{align*}\]- Parameters:
- y(n, K) ndarray
Response matrix \(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 casey
must have an underlying data type ofnumpy.float32
ornumpy.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
MultiGaussian GLM object.