lasso {MetNet}R Documentation

Create a adjacency matrix based on LASSO

Description

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 presence/absence of this connection to a matrix that is returned.

Usage

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

Arguments

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

Details

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

Value

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

Author(s)

Thomas Naake, thomasnaake@googlemail.com

Examples

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

[Package MetNet version 1.0.1 Index]