EBelasticNet.BinomialCV: Cross Validation (CV) Function to Determine Hyperparameter of...

View source: R/EBelasticNet.BinomialCV.R

EBelasticNet.BinomialCVR Documentation

Cross Validation (CV) Function to Determine Hyperparameter of the EB_Elastic Net Algorithm for Binomial Model with Normal-Gamma (NG) Prior Distribution

Description

Hyperparameter controls degree of shrinkage, and is obtained via Cross Validation (CV). This program calculates the maximum lambda that allows one non-zero basis; and performs a search down to 0.001*lambda_max at even steps. (20 steps)

Usage

EBelasticNet.BinomialCV(BASIS, Target, nFolds,foldId, Epis = FALSE, verbose = 0)

Arguments

BASIS

sample matrix; rows correspond to samples, columns correspond to features

Target

Class label of each individual, TAKES VALUES OF 0 OR 1

nFolds

number of n-fold cv

Epis

TRUE or FALSE for including two-way interactions

foldId

random assign samples to different folds

verbose

from 0 to 5; larger verbose displays more messages

Details

If Epis=TRUE, the program adds two-way interaction K*(K-1)/2 more columns to BASIS

Value

CrossValidation

col1: hyperparameter; col2: loglikelihood mean; standard ERROR of nfold mean log likelihood

Lmabda_optimal

the optimal hyperparameter as computed

Alpha_optimal

the optimal hyperparameter as computed

Author(s)

Anhui Huang; Dept of Electrical and Computer Engineering, Univ of Miami, Coral Gables, FL

References

Huang A, Xu S, Cai X: Empirical Bayesian LASSO-logistic regression for multiple binary trait locus mapping. BMC genetics 2013, 14(1):5.

Examples

## not run
library(EBEN)
data(BASISbinomial)
data(yBinomial)
#reduce sample size to speed up the running time
n = 50;
k = 100;
N = length(yBinomial);
set.seed(1)
set  = sample(N,n);
BASIS = BASISbinomial[set,1:k];
y  = yBinomial[set];
nFolds = 3
## Not run: 
CV = EBelasticNet.BinomialCV(BASIS, y, nFolds = 3,Epis = FALSE)

## End(Not run)



EBEN documentation built on May 31, 2023, 8:43 p.m.