Biology Reference
In-Depth Information
The graphical output of cv.lars is shown in the right panel of Fig. 3.5 . The opti-
mal set of arcs to include in the network is chosen by minimizing the mean square
error as a function of the fraction of the final value of the L 1 norm (e.g., when all
arcs are included).
> frac = lasso.cv$index[which.min(lasso.cv$cv)]
> predict(lasso.fit, s = frac, type = "coef",
+
mode = "fraction")
$s
[1] 0.2323232
$fraction
[1] 0.2323232
$mode
[1] "fraction"
$coefficients
265768_at 263426_at 260676_at 258736_at
-0.04137319 0.00000000 0.00000000 0.00000000
257710_at 255764_at 255070_at 253425_at
0.00000000 0.02891478 0.00000000 0.00000000
253174_at 251324_at 245319_at 245094_at
0.00000000 0.00000000 0.00000000 -0.72815587
The nonzero coefficients in the output of predict indicate which arcs are inci-
dent on the gene 265768 at for the optimal fraction s = frac computed by
cv.lars .
Structure learning can also be performed by stopping the LASSO estimation af-
ter a certain number s of steps (i.e., s=3 ) by setting the mode argument of
predict to step .
> predict(lasso.fit, s = 3, type = "coef",
+ mode = "step")$coefficients
265768_at 263426_at 260676_at 258736_at
-0.02152962 0.00000000 0.00000000 0.00000000
257710_at 255764_at 255070_at 253425_at
0.00000000 0.00000000 0.00000000 0.00000000
253174_at 251324_at 245319_at 245094_at
0.00000000 0.00000000 0.00000000 -0.72966658
Finally, we can specify the L 1 penalty itself, i.e., s
2, with mode = "lambda" .
> predict(lasso.fit, s = 0.2, type = "coef",
+
=
0
.
mode = "lambda")$coefficients
265768_at 263426_at 260676_at 258736_at
0.0000000 0.0000000 0.0000000 0.0000000
Search WWH ::




Custom Search