Gitlab is now using https://gitlab.lcsb.uni.lu as it's primary address. Please update your bookmarks. 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,6 +565,8 @@ cv.joinet <- function(Y,X,family="gaussian",nfolds.ext=5,nfolds.int=10,foldid.ex
# check packages
pkgs <- .packages(all.available=TRUE)
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",
......@@ -574,6 +576,7 @@ cv.joinet <- function(Y,X,family="gaussian",nfolds.ext=5,nfolds.int=10,foldid.ex
stop("Method \"",compare[i],"\" requires package \"",pkg,"\".",call.=FALSE)
}
}
}
#--- checks ---
#if(any( & any(family!="gaussian")){
......
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