-
Notifications
You must be signed in to change notification settings - Fork 2
How to Use
Colby Ford edited this page Aug 15, 2018
·
1 revision
library(parEBEN)
library(EBEN)
library(doParallel)
cl <- makeCluster(8)
registerDoParallel(cl)
library(doMPI)
if (!identical(getDoParName(), 'doMPI')) {
cl <- startMPIcluster(count=256,verbose=TRUE)
registerDoMPI(cl)
}
library(doSNOW)
cl <- makeMPIcluster(256)
registerDoSNOW(cl)
data(BASIS)
data(y)
n = 50
k = 100
BASIS = BASIS[1:n,1:k]
y = y[1:n]
parEBENcv <- CrossValidate(BASIS,
y,
nFolds = 3,
Epis = "no",
prior = "gaussian",
search = "global")
EBENoutput <- EBelasticNet.Gaussian(BASIS,
y,
lambda = parEBENcv$lambda.optimal,
alpha = parEBENcv$alpha.optimal,
Epis = "no",
verbose = 1)