cross_validate_lambda: Helper function for running cross validation on a sequence of...

View source: R/glmnet.R

cross_validate_lambdaR Documentation

Helper function for running cross validation on a sequence of lambda values for the mgaussian family

Description

Helper function for running cross validation on a sequence of lambda values for the mgaussian family

Usage

cross_validate_lambda(x, y, groups, alpha, lambda, folds, seq.lambda.pred)

Arguments

x

Design matrix + covariates matrix

y

Expression response

groups

Perturbation dictionary (in list format) or named vector

alpha

Alpha value

lambda

lambda values to test

folds

List of train/test splits

seq.lambda.pred

Predict expression at each lambda value sequentially to save memory

metric

Metric to use for evaluation (pearson, spearman)

family

GLM family to use for elasticnet (default: mgaussian)

Value

Matrix of cross validation correlations per fold


yanwu2014/perturbLM documentation built on Aug. 24, 2023, 2:28 p.m.