Closed xingxingyanjing closed 6 months ago
Yes, because that part of msaenet is built on the glmnet package. As I quote from their vignette:
The glmnet algorithms use cyclical coordinate descent, which successively optimizes the objective function over each parameter with others fixed, and cycles repeatedly until convergence. The package also makes use of the strong rules for efficient restriction of the active set. Due to highly efficient updates and techniques such as warm starts and active-set convergence, our algorithms can compute the solution path very quickly.
Hello, thank you very much for your answer. I find this package quite useful for evaluating models against different criteria. In my opinion, I think this package could use more explanatory language, especially for people using it for the first time. For instance, I know msaenet is based on some other packages, but I'm not sure which algorithm from which package is being used. It's possible I just haven't found the corresponding documentation yet. Also, I still have a few confusion.
For vanilla elastic-net, I'd just use glmnet::glmnet(alpha = ...)
to get canonical results.
Use label.vars
in plot()
to specify variable names. This is documented in plot.msaenet(). For example:
library("msaenet")
dat <- msaenet.sim.gaussian(
n = 200, p = 500, rho = 0.6, snr = 2,
coef = c(rnorm(3, 10, 5), rnorm(3, -10, 5)),
p.train = 0.8,
seed = 42
)
fit <- msaenet(
dat$x.tr, dat$y.tr,
alphas = seq(0.1, 0.9, 0.1),
nsteps = 10L, tune.nsteps = "ebic",
seed = 42
)
label <- grex:::grex_db$hgnc_symbol[seq_len(ncol(dat$x.tr))]
plot(fit, label = TRUE, label.vars = label)
plot(fit, type = "dotplot", label = TRUE, label.vars = label)
This gives
In fact, I'm planning to work on elastic network and adaptive elastic network at the same time. I'll think of a solution and I really appreciate your help. Thank you!
Hello,did the coordinate descent method be used to estimate the coefficients of elastic network and adaptive elastic network?