lambda
argument) of $$\hat R(\beta) + \lambda
\left( (1-\alpha) \sum_{J=1}^m \gamma_J \|\beta^{(J)}\|_2
+ \alpha \sum_{i=1}^{n} \xi_i |\beta_i| \right)$$ where
$\hat R$ is the weighted empirical log-likelihood
risk of the multinomial regression model. The vector
$\beta^{(J)}$ denotes the parameters associated with
the $J$'th group of covariates (default is one
covariate per group, hence the default dimension of
$\beta^{(J)}$ is $K$). The group weights
$\gamma \in [0,\infty)^m$ and the parameter weights
$\xi = (\xi^{(1)},\dots, \xi^{(m)}) \in [0,\infty)^n$
with $\xi^{(1)}\in [0,\infty)^{n_1},\dots, \xi^{(m)}
\in [0,\infty)^{n_m}$.msgl(x, classes,
sampleWeights = rep(1/length(classes), length(classes)),
grouping = NULL, groupWeights = NULL,
parameterWeights = NULL, alpha = 0.5,
standardize = TRUE, lambda, return = 1:length(lambda),
sparse.data = FALSE,
algorithm.config = sgl.standard.config)
groupWeights
= NULL
default weights will be used. Default weights are
0 for the intercept and $$\sqrt{K\cdx
will be treated as
sparse, if x
is a sparse matrix it will be treated
as sparse by default.length(lambda)
with each entry a matrix of size
$K\times (p+1)$ holding the fitted parametersdata(SimData)
x <- sim.data$x
classes <- sim.data$classes
lambda <- msgl.lambda.seq(x, classes, alpha = .5, d = 100L, lambda.min = 0.01)
fit <- msgl(x, classes, alpha = .5, lambda = lambda)
fit$beta[[10]] #model with lambda = lambda[10]
Run the code above in your browser using DataLab