lasso | R Documentation |

'lasso' infers a adjacency matrix using LASSO using the 'stabsel.matrix' function from the 'stabs' package. 'lasso' extracts the predictors from the function 'stabsel.matrix' and writes the coefficients to an adjacency matrix.

lasso(x, parallel = FALSE, ...)

`x` |
matrix, where columns are the samples and the rows are features (metabolites), cell entries are intensity values |

`parallel` |
logical, should computation be parallelized? If 'parallel = TRUE' the 'bplapply' will be applied if 'parallel = FALSE' the 'lapply' function will be applied. |

`...` |
parameters passed to 'stabsel.matrix' |

For use of the parameters used in the 'stabsel.matrix' function, refer to '?stabs::stabsel.matrix'.

matrix, matrix with edges inferred from LASSO algorithm 'stabsel.matrix'

Thomas Naake, thomasnaake@googlemail.com

data("x_test", package = "MetNet") x <- x_test[1:10, 3:ncol(x_test)] x <- as.matrix(x) x_z <- t(apply(x, 1, function(y) (y - mean(y)) / sd(y))) ## Not run: lasso(x = x_z, PFER = 0.95, cutoff = 0.95)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.