a.FLORAL {FLORAL} | R Documentation |
Comparing prediction performances under different choices of weights for lasso/ridge penalty
Description
Summarizing FLORAL
outputs from various choices of a
Usage
a.FLORAL(
a = c(0.1, 0.5, 1),
ncore = 1,
seed = NULL,
x,
y,
ncov = 0,
family = "gaussian",
longitudinal = FALSE,
id = NULL,
tobs = NULL,
failcode = NULL,
length.lambda = 100,
lambda.min.ratio = NULL,
ncov.lambda.weight = 0,
mu = 1,
ncv = 5,
intercept = FALSE,
step2 = FALSE,
progress = TRUE
)
Arguments
a |
vector of scalars between 0 and 1 for comparison. |
ncore |
Number of cores used for parallel computation. Default is to use only 1 core. |
seed |
A random seed for reproducibility of the results. By default the seed is the numeric form of |
x |
Feature matrix, where rows specify subjects and columns specify features. The first |
y |
Outcome. For a continuous or binary outcome, |
ncov |
An integer indicating the number of first |
family |
Available options are |
longitudinal |
|
id |
If |
tobs |
If |
failcode |
If |
length.lambda |
Number of penalty parameters used in the path |
lambda.min.ratio |
Ratio between the minimum and maximum choice of lambda. Default is |
ncov.lambda.weight |
Weight of the penalty lambda applied to the first |
mu |
Value of penalty for the augmented Lagrangian |
ncv |
Folds of cross-validation. Use |
intercept |
|
step2 |
|
progress |
|
Value
A ggplot2
object of cross-validated prediction metric versus lambda
, stratified by a
. Detailed data can be retrieved from the ggplot2
object itself.
Author(s)
Teng Fei. Email: feit1@mskcc.org
References
Fei T, Funnell T, Waters N, Raj SS et al. Scalable Log-ratio Lasso Regression Enhances Microbiome Feature Selection for Predictive Models. bioRxiv 2023.05.02.538599.
Examples
set.seed(23420)
dat <- simu(n=50,p=30,model="linear")
pmetric <- a.FLORAL(a=c(0.1,1),ncore=1,x=dat$xcount,y=dat$y,family="gaussian",ncv=2,progress=FALSE)