Description Details Author(s) Examples
Package mc.glmnet performs fit of L1 penalised model to the data. It is introduction to solution for Graphical Gaussion Models precission matrix. There had been used parallel computing in order to reduce time of computations.
For solving simple lasso problem, the number of predictors is usualy reasonably small so the time of computations is not crutial. For Graphical Gaussian Models number of parameters to be estimated is squared.
The main function of package mc.glmnet is
mcmm.glmnet
which allows to solve multiple Lasso problems
using parallel computations. For large number of predictros solution presents
significant better performance than usage of simple onee core computations.
We also provide function sm.glmnet
that computes single model
single L1 penalised model for generated inside data.
Note that Windows users for propper evaluation of mcmm.glmnet and reduction in computation time, script available at http://www.stat.cmu.edu/~nmv/setup/mclapply.hack.R
Version: 0.1.1
Jan Idziak
Maintainer: Jan Idziak Jan.Idziak@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(GeneNet)
graph.data.generate <- function(seed = 42048, fraction = 0.1, p = 500, n = 50, b.values = rep(2,50)){
set.seed(seed)
data <- list()
precision <- ggm.simulate.pcor(p, fraction)
data$X <- ggm.simulate.data(n, precision)
beta <- c(b.values, rep(0, times = p-length(b.values)))
probs <- round(1/(1+(exp(-data$X%*%beta))), digits = 4)
data$Y <- rbinom(n, 1, probs)
return(data)}
sm.glmnet(graph.data.generate)
sm.glmnet(graph.data.generate, p = 500, n = 50)
sm.glmnet(graph.data.generate, fraction = 0.05 ,p = 500, n = 100)
mcmm.glmnet(graph.data.generate)
mcmm.glmnet(graph.data.generate, p = 500, n = 50)
mcmm.glmnet(graph.data.generate, fraction = 0.05 ,p = 500, n = 100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.