Bayesian Networks in R by Radhakrishnan Nagarajan Marco Scutari & Sophie Lèbre
Author:Radhakrishnan Nagarajan, Marco Scutari & Sophie Lèbre
Language: eng
Format: epub
Publisher: Springer New York, New York, NY
3.5.2 LASSO Learning: lars and simone
Several implementations of LASSO are available in R; in the following, we will use the lars package developed by Hastie and Efron (2012). Other possible choices are glmnet by Friedman et al. (2010) and penalized by Goeman (2012).
> library(lars)
Consider the arth800 MTS data set from the GeneNet package. arth800 describes the temporal expression of 800 genes of the Arabidopsis thaliana during the diurnal cycle. In the following example, we will consider a subset arth12 of 12 genes.
> library(GeneNet)
> data(arth800)
> subset = c(60, 141, 260, 333, 365, 424, 441, 512,
+ 521, 578, 789, 799)
> arth12 = arth800.expr[, subset]
Model estimation is performed using the lars function for a target variable specified by a vector (y) and a set of possible parents specified by a matrix of predictors (x). The arth800 data set is composed of 2 time series of 11 time points each: there are two repeated measurements for each time point. Suppose we want to estimate a VAR(1) process. Consequently, we removed the two repeated measurements for the first time point from y and the two repeated measurements for the last time point from x; they cannot be used for the LASSO due to the lack of the corresponding time points in x and y, respectively.
> x = arth12[1:(nrow(arth12) - 2), ]
> y = arth12[-(1:2), "265768_at"]
> lasso.fit = lars(y = y, x = x, type = "lasso")
Similarly, we can fit one LASSO model each target variable as follows.
> fit.all = lapply(colnames(arth12),
+ function(gene) {
+ y = arth12[-(1:2), gene]
+ lars(y = y, x = x, type = "lasso")
+ })
The order in which the coefficients for the parents are included in lasso.fit, which is the order in which the corresponding arcs are included in the gene expression network around the gene 265768_at, is shown in the left panel of Fig.â3.5 and is produced with the plot method for lars objects.
> plot(lasso.fit)
Fig. 3.5Graphical output from package lars. Left: learning process for lasso.fit. Arcs are included one at a time, and each inclusion is marked with a vertical line. Right: cross-validation estimates of the mean square error as a function of the fraction of the final value of the L 1 norm
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Modelling of Convective Heat and Mass Transfer in Rotating Flows by Igor V. Shevchuk(6213)
Weapons of Math Destruction by Cathy O'Neil(5794)
Factfulness: Ten Reasons We're Wrong About the World – and Why Things Are Better Than You Think by Hans Rosling(4464)
Descartes' Error by Antonio Damasio(3145)
A Mind For Numbers: How to Excel at Math and Science (Even If You Flunked Algebra) by Barbara Oakley(3087)
Factfulness_Ten Reasons We're Wrong About the World_and Why Things Are Better Than You Think by Hans Rosling(3031)
TCP IP by Todd Lammle(2988)
Applied Predictive Modeling by Max Kuhn & Kjell Johnson(2880)
Fooled by Randomness: The Hidden Role of Chance in Life and in the Markets by Nassim Nicholas Taleb(2838)
The Tyranny of Metrics by Jerry Z. Muller(2823)
The Book of Numbers by Peter Bentley(2750)
The Great Unknown by Marcus du Sautoy(2521)
Once Upon an Algorithm by Martin Erwig(2462)
Easy Algebra Step-by-Step by Sandra Luna McCune(2439)
Lady Luck by Kristen Ashley(2391)
Practical Guide To Principal Component Methods in R (Multivariate Analysis Book 2) by Alboukadel Kassambara(2364)
Police Exams Prep 2018-2019 by Kaplan Test Prep(2337)
All Things Reconsidered by Bill Thompson III(2247)
Linear Time-Invariant Systems, Behaviors and Modules by Ulrich Oberst & Martin Scheicher & Ingrid Scheicher(2216)
