Gitlab migration complete. If you have any issue please read the FAQ.

Commit 1e71f789 authored by Armin Rauschenberger's avatar Armin Rauschenberger
Browse files

competing models

parent 670380ee
......@@ -534,7 +534,7 @@ cv.joinet <- function(Y,X,family="gaussian",nfolds.ext=5,nfolds.int=10,foldid.ex
#nfolds.ext <- 1; foldid.ext <- fold; nfolds.int <- 10; foldid.int <- NULL; compare <- TRUE
}
if(!is.null(compare) && length(compare)==1 && compare==TRUE){
if(length(compare)==1 && compare==TRUE){
if(all(family=="gaussian")){
compare <- c("mnorm","mars","spls","mrce","map","mrf","sier","mcen","gpm","rmtl","mtps")
} else if(all(family=="binomial")){
......@@ -565,13 +565,16 @@ cv.joinet <- function(Y,X,family="gaussian",nfolds.ext=5,nfolds.int=10,foldid.ex
# check packages
pkgs <- .packages(all.available=TRUE)
for(i in seq_along(compare)){
pkg <- switch(compare[i],mnorm="glmnet",mars="earth",spls="spls",
if(length(compare)>1 || compare==TRUE){
for(i in seq_along(compare)){
pkg <- switch(compare[i],mnorm="glmnet",mars="earth",spls="spls",
mrce="MRCE",map="remMap",mrf="MultivariateRandomForest",
sier="SiER",mcen="mcen",gpm="GPM",rmtl="RMTL",mtps="MTPS",
stop("Invalid method.",call.=FALSE))
if(!pkg %in% pkgs){
stop("Method \"",compare[i],"\" requires package \"",pkg,"\".",call.=FALSE)
if(!pkg %in% pkgs){
stop("Method \"",compare[i],"\" requires package \"",pkg,"\".",call.=FALSE)
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment