lasso {MetNet} | R Documentation

## Create an 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 coefficients to an adjacency matrix.

### 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[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_z, PFER = 0.95, cutoff = 0.95)

[Package MetNet version 1.6.0 Index]