Link
Canonical GLM link function. Encodes everything that varies between Gaussian linear regression and its GLM siblings:
invMean turns the linear predictor
eta = bias + x . winto the response mean (identity / sigmoid / exp).curvature is the second derivative of the per-observation negative log-likelihood w.r.t. eta, used by DiagonalRegressionStat / BayesianRegressionStat to tighten precision per observation. Equals the variance function under the canonical link.
loss is the per-observation negative log-likelihood computed in a numerically stable way (log-trick for Logit, no overflow on either tail). Constants that don't depend on
etaare dropped, so the absolute value is shifted but differences and sums are correct.
Only canonical links are exposed: pairing a non-canonical link with the gradient shortcut grad_i = (mu - y) * x_i is wrong, so restricting the type rules that out.