View source: R/family.grpnet.R
family.grpnet | R Documentation |
Takes in the family
argument from grpnet
and returns a list containing the information needed for fitting and/or tuning the model.
family.grpnet(object, theta = 1)
object |
two options: (1) an object of class "grpnet" or "cv.grpnet"; or (2) a character specifying the exponential family: |
theta |
positive scalar that serves as an additional hyperparameter for various loss functions. svm1: additional parameter that controls the smoothing rate for the hinge loss function (see Note below). negative.binomial: size parameter such that the variance function is defined as |
There is only one available link function for each family
:
* gaussian (identity): \mu = \mathbf{X}^\top \boldsymbol\beta
* multigaussian (identity): \mu = \mathbf{X}^\top \boldsymbol\beta
* svm1/svm2 (identity): \mu = \mathbf{X}^\top \boldsymbol\beta
* binomial/logit (logit): \log(\frac{\pi}{1 - \pi}) = \mathbf{X}^\top \boldsymbol\beta
* multinomial (symmetric): \pi_\ell = \frac{\exp(\mathbf{X}^\top \boldsymbol\beta_\ell)}{\sum_{l = 1}^m \exp(\mathbf{X}^\top \boldsymbol\beta_l)}
* poisson (log): \log(\mu) = \mathbf{X}^\top \boldsymbol\beta
* negative.binomial (log): \log(\mu) = \mathbf{X}^\top \boldsymbol\beta
* Gamma (log): \log(\mu) = \mathbf{X}^\top \boldsymbol\beta
* inverse.gaussian (log): \log(\mu) = \mathbf{X}^\top \boldsymbol\beta
List with components:
family |
same as input object, i.e., character specifying the family |
linkinv |
function for computing inverse of link function |
dev.resids |
function for computing deviance residuals |
For gaussian
family, this returns the full output produced by gaussian
.
For svm1
family, the quadratically smoothed hinge loss is defined as
\mathrm{svm1}(z) = \left\{ \begin{array}{ll}
0 & z > 1 \\
(1 - z)^2 / (2 \theta) & 1 - \theta < z \leq 1 \\
1 - z - \theta / 2 & z \leq 1 - \theta \\
\end{array} \right.
where z = Y \eta
with Y \in \{-1,1\}
denoting the response and \eta = \mathbf{X}^\top \boldsymbol\beta
denoting the linear predictor. Note that the svm1
loss function approaches the support vector machine (i.e., hinge) loss function as \theta \rightarrow 0
.
For svm2
family, the squared hinge loss is defined as
\mathrm{svm2}(z) = \left\{ \begin{array}{ll}
0 & z > 1 \\
(1 - z)^2 & z \leq 1 \\
\end{array} \right.
where z = Y \eta
with Y \in \{-1,1\}
denoting the response and \eta = \mathbf{X}^\top \boldsymbol\beta
denoting the linear predictor. Note that the svm1
loss function approaches the support vector machine (i.e., hinge) loss function as \theta \rightarrow 0
.
Nathaniel E. Helwig <helwig@umn.edu>
Helwig, N. E. (2025). Versatile descent algorithms for group regularization and variable selection in generalized linear models. Journal of Computational and Graphical Statistics, 34(1), 239-252. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/10618600.2024.2362232")}
visualize.loss
for plotting loss functions
grpnet
for fitting group elastic net regularization paths
cv.grpnet
for k-fold cross-validation of lambda
family.grpnet("gaussian")
family.grpnet("multigaussian")
family.grpnet("svm1", theta = 0.1)
family.grpnet("svm2")
family.grpnet("logit")
family.grpnet("binomial")
family.grpnet("multinomial")
family.grpnet("poisson")
family.grpnet("negative.binomial", theta = 10)
family.grpnet("Gamma")
family.grpnet("inverse.gaussian")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.