Lambda_gird: Simulate a grid set of lambdas for a given alpha in penalized...

Lambda_girdR Documentation

Simulate a grid set of lambdas for a given alpha in penalized regression.

Usage

Lambda_gird(X, y, n_lambda, alpha, loss_func)

Arguments

X

expression levels of n_genes target genes (TGs).

y

expression levels of a transcription factor (TF).

n_lambda

the number of lambdas.

alpha

the proportion of l1 norm affects (the numerical values of nonzero coefficients). Its in range (0,1].

loss_func

either "Huber" or "MSE". If loss_func = "Huber", the loss function in penalized regression model is Huber function. If loss_func = "MSE", the loss function in penalized regression model is mean squared errors.

Value

lambdas

n_lambda length vector of lambdas according to the alpha you provided.

Examples

alpha <- 0.5
    
n_lambda <- 10
    
lambda_set <- Lambda_grid(X, y, n_lambda, alpha, loss_func = "Huber")
    
lambda_set <- Lambda_grid(X, y, n_lambda, alpha, loss_func = "MSE")

xueweic/APGD documentation built on Sept. 4, 2023, 2:18 a.m.