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*}\]
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 is None, in which case, it is set to np.full(n, 1/n).

dtypeUnion[float32, float64], optional

The underlying data type. If None, it is inferred from y, in which case y must have an underlying data type of numpy.float32 or numpy.float64. Default is None.

optbool, optional

If True, an optimized routine is used when passed into adelie.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 is True.

Returns:
glm

MultiGaussian GLM object.