Learn R Programming

EBEN (version 4.1)

EBelasticNet.GaussianCV: Cross Validation (CV) Function to Determine Hyperparameters of the EBEN Algorithm for Gaussian Model

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.0001*lambda_max at even steps. (20 steps)

Usage

EBelasticNet.GaussianCV(BASIS, Target, nFolds, Epis = "no",foldId)

Arguments

BASIS
sample matrix; rows correspond to samples, columns correspond to features
Target
Response each individual
nFolds
number of n-fold cv
Epis
"yes" or "no" for including two-way interactions
foldId
random assign samples to different folds

Value

  • CrossValidationcol1: hyperparameter; col2: loglikelihood mean; standard ERROR of nfold mean log likelihood
  • Lmabda_optimalthe optimal hyperparameter as computed
  • Alpha_optimalthe optimal hyperparameter as computed

Details

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

References

Huang, A., Xu, S., and Cai, X. (2013). Empirical Bayesian elastic net for multiple quantitative trait locus mapping. submitted.

Examples

Run this code
library(EBEN)
data(BASIS)
data(y)
#reduce sample size to speed up the running time
n = 50;
k = 100;
BASIS = BASIS[1:n,1:k];
y  = y[1:n];
CV = EBelasticNet.GaussianCV(BASIS, y, nFolds = 3,Epis = "no")

Run the code above in your browser using DataLab