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

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

competing models

parent b498df2f
This package was submitted to CRAN on 2019-11-13.
Once it is accepted, delete this file and tag the release (commit 9dacfae7a1).
Package: joinet
Version: 0.0.3
Version: 0.0.4
Title: Multivariate Elastic Net Regression
Description: Implements high-dimensional multivariate regression by stacked generalisation (Wolpert 1992 <doi:10.1016/S0893-6080(05)80023-1>). For positively correlated outcomes, a single multivariate regression is typically more predictive than multiple univariate regressions. Includes functions for model fitting, extracting coefficients, outcome prediction, and performance measurement.
Depends: R (>= 3.0.0)
Imports: glmnet, palasso, cornet
Suggests: knitr, testthat, MASS
Enhances: spls, SiER, MRCE
Enhances: spls, SiER, MRCE, MTPS
Authors@R: person("Armin","Rauschenberger",email="armin.rauschenberger@uni.lu",role=c("aut","cre"))
VignetteBuilder: knitr
License: GPL-3
LazyData: true
Language: en-GB
RoxygenNote: 6.1.1
RoxygenNote: 7.1.0
URL: https://github.com/rauschenberger/joinet
BugReports: https://github.com/rauschenberger/joinet/issues
## joinet 0.0.4 (2020-05-06)
* added competing models
## joinet 0.0.3 (2019-11-12)
* changed glmnet exports
......
......@@ -447,9 +447,10 @@ print.joinet <- function(x,...){
#' between \eqn{1} and \code{nfolds.int};
#' or \code{NULL}
#'
#' @param mnorm,spls,sier,mrce
#' @param mnorm,spls,mrce,sier,mtps
#' experimental arguments\strong{:}
#' logical (requires packages \code{spls}, \code{SiER}, or \code{MRCE})
#' logical
#' (require packages \code{spls}, \code{MRCE}, \code{SiER} or \code{MTPS})
#'
#' @param cvpred
#' return cross-validated predicition: logical
......@@ -509,7 +510,9 @@ print.joinet <- function(x,...){
#' set.seed(1)
#' cv.joinet(Y=Y,X=X,alpha.base=0) # ridge}
#'
cv.joinet <- function(Y,X,family="gaussian",nfolds.ext=5,nfolds.int=10,foldid.ext=NULL,foldid.int=NULL,type.measure="deviance",alpha.base=1,alpha.meta=0,mnorm=FALSE,spls=FALSE,sier=FALSE,mrce=FALSE,cvpred=FALSE,...){
cv.joinet <- function(Y,X,family="gaussian",nfolds.ext=5,nfolds.int=10,foldid.ext=NULL,foldid.int=NULL,type.measure="deviance",alpha.base=1,alpha.meta=0,mnorm=FALSE,spls=FALSE,mrce=FALSE,sier=FALSE,mtps=FALSE,cvpred=FALSE,...){
# family <- "gaussian"; nfolds.ext <- 5; nfolds.int <- 10; foldid.ext <- foldid.int <- NULL; type.measure <- "deviance"; alpha.base <- 1; alpha.meta <- 0; mnorm <- spls <- mrce <- sier <- mtps <- cvpred <- TRUE
n <- nrow(Y)
q <- ncol(Y)
......@@ -529,9 +532,17 @@ cv.joinet <- function(Y,X,family="gaussian",nfolds.ext=5,nfolds.int=10,foldid.ex
stop("Invalid argument family",call.=FALSE)
}
#--- checks ---
if(any(mnorm,spls,mrce,sier) & any(family!="gaussian")){
stop("\"mnorm\", \"spls\", \"mrce\" and \"sier\" require family \"gaussian\"",call.=FALSE)
}
if(mtps & any(!family %in% c("gaussian","binomial"))){
stop("\"mtps\" requires family \"gaussian\" or \"binomial\"",call.=FALSE)
}
#--- cross-validated predictions ---
models <- c("base","meta","mnorm"[mnorm],"spls"[spls],"sier"[sier],"mrce"[mrce],"none")
models <- c("base","meta","mnorm"[mnorm],"spls"[spls],"mrce"[mrce],"sier"[sier],"mtps"[mtps],"none")
pred <- lapply(X=models,function(x) matrix(data=NA,nrow=n,ncol=q))
names(pred) <- models
......@@ -548,7 +559,7 @@ cv.joinet <- function(Y,X,family="gaussian",nfolds.ext=5,nfolds.int=10,foldid.ex
}
# base and meta learners
fit <- joinet(Y=Y0,X=X0,family=family,type.measure=type.measure,alpha.base=alpha.base,alpha.meta=alpha.meta,foldid=foldid) # add ,...
fit <- joinet(Y=Y0,X=X0,family=family,type.measure=type.measure,alpha.base=alpha.base,alpha.meta=alpha.meta,foldid=foldid) # add ellipsis (...)
temp <- predict.joinet(fit,newx=X1)
pred$base[foldid.ext==i,] <- temp$base
pred$meta[foldid.ext==i,] <- temp$meta
......@@ -557,30 +568,49 @@ cv.joinet <- function(Y,X,family="gaussian",nfolds.ext=5,nfolds.int=10,foldid.ex
cond <- apply(X0,2,function(x) stats::sd(x)!=0)
x0 <- X0[,cond]
x1 <- X1[,cond]
y0 <- apply(X=Y0,MARGIN=2,FUN=function(x) ifelse(is.na(x),sample(x[!is.na(x)],size=1),x))
#y0 <- apply(X=Y0,MARGIN=2,FUN=function(x) ifelse(is.na(x),sample(x[!is.na(x)],size=1),x))
y0 <- apply(X=Y0,MARGIN=2,FUN=function(x) ifelse(is.na(x),stats::median(x[!is.na(x)]),x))
all(Y0==y0,na.rm=TRUE)
if(mnorm){
net <- glmnet::cv.glmnet(x=X0,y=y0,family="mgaussian",foldid=foldid,...) # ellipsis
net <- glmnet::cv.glmnet(x=X0,y=y0,family="mgaussian",foldid=foldid,alpha=alpha.base) # add ellipsis (...)
pred$mnorm[foldid.ext==i,] <- stats::predict(object=net,newx=X1,s="lambda.min",type="response")
}
if(spls){
# check!
cv.spls <- spls::cv.spls(x=x0,y=y0,fold=nfolds.int,K=seq_len(10),
eta=seq(from=0.1,to=0.9,by=0.1),scale.x=FALSE,plot.it=FALSE)
mspls <- spls::spls(x=x0,y=y0,K=cv.spls$K.opt,cv.spls$eta.opt,scale.x=FALSE)
pred$spls[foldid.ext==i,] <- spls::predict.spls(object=mspls,newx=x1,type="fit")
}
if(sier){
object <- SiER::cv.SiER(X=X0,Y=y0,K.cv=10)
pred$sier[foldid.ext==i,] <- SiER::pred.SiER(cv.fit=object,X.new=X1)
}
if(mrce){
# bug?
lam1 <- rev(10^seq(from=-2,to=0,by=0.5))
lam2 <- rev(10^seq(from=-2,to=0,by=0.5))
#lam1 <- lam2 <- 10^seq(from=0,to=-0.7,length.out=5)
object <- MRCE::mrce(X=x0,Y=y0,lam1.vec=lam1,lam2.vec=lam2,method="cv")
pred$mrce[foldid.ext==i,] <- object$muhat + x1 %*% object$Bhat
}
if(sier){
# slow!
object <- SiER::cv.SiER(X=X0,Y=y0,K.cv=10)
pred$sier[foldid.ext==i,] <- SiER::pred.SiER(cv.fit=object,X.new=X1)
}
if(mtps){
if(alpha.base==0){
step1 <- MTPS::glmnet.ridge
} else if(alpha.base==1){
step1 <- MTPS::glmnet.lasso
} else {
stop("MTPS requires alpha.base 0 or 1.",call.=FALSE)
}
step2 <- MTPS::rpart1
object <- MTPS::MTPS(xmat=X0,ymat=y0,family=family,nfold=nfolds.int,
method.step1=step1,method.step2=step2)
pred$mtps[foldid.ext==i,] <- MTPS::predict.MTPS(object=object,newdata=X1,type="response")
# See paper for choice of base and meta learner!
# Reason for worse performance: "lambda.1se"
}
pred$none[foldid.ext==i,] <- matrix(colMeans(Y0,na.rm=TRUE),nrow=sum(foldid.ext==i),ncol=ncol(Y0),byrow=TRUE)
......
# Notes
- new author email for palasso, cornet and joinet
- package runs without errors with palasso 0.0.6
\ No newline at end of file
......@@ -67,7 +67,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">joinet</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.3</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.4</span>
</span>
</div>
......
......@@ -31,7 +31,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">joinet</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.3</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.4</span>
</span>
</div>
......@@ -90,7 +90,7 @@
<div id="reference" class="section level2">
<h2 class="hasAnchor">
<a href="#reference" class="anchor"></a>Reference</h2>
<p>Armin Rauschenberger and Enrico Glaab (2019). “joinet: predicting correlated outcomes jointly to improve clinical prognosis”. <em>Manuscript in preparation.</em></p>
<p>Armin Rauschenberger and Enrico Glaab (2020). “joinet: predicting correlated outcomes jointly to improve clinical prognosis”. <em>Manuscript in preparation.</em></p>
</div>
</div>
......
......@@ -67,7 +67,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">joinet</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.3</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.4</span>
</span>
</div>
......
......@@ -31,7 +31,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">joinet</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.3</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.4</span>
</span>
</div>
......@@ -93,7 +93,7 @@
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="kw"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span>(<span class="st">"joinet"</span>)</a></code></pre></div>
<p>Or install the latest development version from <a href="https://github.com/rauschenberger/joinet">GitHub</a>:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1"><span class="co">#install.packages("devtools")</span></a>
<a class="sourceLine" id="cb2-2" title="2">devtools<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/devtools/man/remote-reexports.html">install_github</a></span>(<span class="st">"rauschenberger/joinet"</span>)</a></code></pre></div>
<a class="sourceLine" id="cb2-2" title="2">devtools<span class="op">::</span><span class="kw"><a href="https://devtools.r-lib.org//reference/remote-reexports.html">install_github</a></span>(<span class="st">"rauschenberger/joinet"</span>)</a></code></pre></div>
</div>
<div id="initialisation" class="section level2">
<h2 class="hasAnchor">
......@@ -164,24 +164,29 @@
<div id="reference" class="section level2">
<h2 class="hasAnchor">
<a href="#reference" class="anchor"></a>Reference</h2>
<p>Armin Rauschenberger and Enrico Glaab (2019). “joinet: predicting correlated outcomes jointly to improve clinical prognosis”. <em>Manuscript in preparation.</em> <!--
<p>Armin Rauschenberger and Enrico Glaab (2020). “joinet: predicting correlated outcomes jointly to improve clinical prognosis”. <em>Manuscript in preparation.</em></p>
<!--
```r
#install.packages("MTPS")
data("HIV",package="MTPS",verbose=TRUE)
loss1 <- cv.joinet(Y=YY,X=XX,mnorm=TRUE,mtps=TRUE)
#install.packages("plsgenomics")
data(Ecoli,package="plsgenomics")
X <- Ecoli$CONNECdata
Y <- Ecoli$GEdata
loss <- cv.joinet(Y=Y,X=X)
loss2 <- cv.joinet(Y=Y,X=X,mnorm=TRUE,mtps=TRUE)
#install.packages("BiocManager")
#BiocManager::install("mixOmics")
data(liver.toxicity,package="mixOmics")
X <- liver.toxicity$gene
Y <- liver.toxicity$clinic
Y$Cholesterol.mg.dL. <- -Y$Cholesterol.mg.dL.
loss <- cv.joinet(Y=Y,X=X)
X <- as.matrix(liver.toxicity$gene)
Y <- as.matrix(liver.toxicity$clinic)
Y[,"Cholesterol.mg.dL."] <- -Y[,"Cholesterol.mg.dL."]
loss3 <- cv.joinet(Y=Y,X=X,mnorm=TRUE,mtps=TRUE)
```
--></p>
-->
</div>
</div>
......
......@@ -67,7 +67,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">joinet</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.3</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.4</span>
</span>
</div>
......
......@@ -31,7 +31,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">joinet</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.3</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.4</span>
</span>
</div>
......@@ -89,7 +89,7 @@
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="kw"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span>(<span class="st">"joinet"</span>)</a></code></pre></div>
<p>or the latest development version from <a href="https://github.com/rauschenberger/joinet">GitHub</a>:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1"><span class="co">#install.packages("devtools")</span></a>
<a class="sourceLine" id="cb2-2" title="2">devtools<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/devtools/man/remote-reexports.html">install_github</a></span>(<span class="st">"rauschenberger/joinet"</span>)</a></code></pre></div>
<a class="sourceLine" id="cb2-2" title="2">devtools<span class="op">::</span><span class="kw"><a href="https://devtools.r-lib.org//reference/remote-reexports.html">install_github</a></span>(<span class="st">"rauschenberger/joinet"</span>)</a></code></pre></div>
</div>
<div id="reference" class="section level2">
<h2 class="hasAnchor">
......
......@@ -67,7 +67,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">joinet</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.3</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.4</span>
</span>
</div>
......@@ -116,6 +116,13 @@
<small>Source: <a href='https://github.com/rauschenberger/joinet/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
</div>
<div id="joinet-004-2020-05-06" class="section level2">
<h2 class="hasAnchor">
<a href="#joinet-004-2020-05-06" class="anchor"></a>joinet 0.0.4 (2020-05-06)</h2>
<ul>
<li>added competing models</li>
</ul>
</div>
<div id="joinet-003-2019-11-12" class="section level2">
<h2 class="hasAnchor">
<a href="#joinet-003-2019-11-12" class="anchor"></a>joinet 0.0.3 (2019-11-12)</h2>
......@@ -143,6 +150,7 @@
<div id="tocnav">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#joinet-004-2020-05-06">0.0.4</a></li>
<li><a href="#joinet-003-2019-11-12">0.0.3</a></li>
<li><a href="#joinet-002-2019-08-08">0.0.2</a></li>
<li><a href="#joinet-001-2019-08-03">0.0.1</a></li>
......
......@@ -71,7 +71,7 @@ the coefficients from the base learners.)" />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">joinet</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.3</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.4</span>
</span>
</div>
......
......@@ -69,7 +69,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">joinet</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.3</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.4</span>
</span>
</div>
......@@ -123,10 +123,25 @@
<p>Compares univariate and multivariate regression.</p>
</div>
<pre class="usage"><span class='fu'>cv.joinet</span>(<span class='no'>Y</span>, <span class='no'>X</span>, <span class='kw'>family</span> <span class='kw'>=</span> <span class='st'>"gaussian"</span>, <span class='kw'>nfolds.ext</span> <span class='kw'>=</span> <span class='fl'>5</span>, <span class='kw'>nfolds.int</span> <span class='kw'>=</span> <span class='fl'>10</span>,
<span class='kw'>foldid.ext</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>foldid.int</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>type.measure</span> <span class='kw'>=</span> <span class='st'>"deviance"</span>,
<span class='kw'>alpha.base</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>alpha.meta</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>mnorm</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>spls</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>sier</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>mrce</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>cvpred</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)</pre>
<pre class="usage"><span class='fu'>cv.joinet</span>(
<span class='no'>Y</span>,
<span class='no'>X</span>,
<span class='kw'>family</span> <span class='kw'>=</span> <span class='st'>"gaussian"</span>,
<span class='kw'>nfolds.ext</span> <span class='kw'>=</span> <span class='fl'>5</span>,
<span class='kw'>nfolds.int</span> <span class='kw'>=</span> <span class='fl'>10</span>,
<span class='kw'>foldid.ext</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>foldid.int</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>type.measure</span> <span class='kw'>=</span> <span class='st'>"deviance"</span>,
<span class='kw'>alpha.base</span> <span class='kw'>=</span> <span class='fl'>1</span>,
<span class='kw'>alpha.meta</span> <span class='kw'>=</span> <span class='fl'>0</span>,
<span class='kw'>mnorm</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>spls</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>mrce</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>sier</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>mtps</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>cvpred</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='no'>...</span>
)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
......@@ -190,9 +205,10 @@ numeric between \(0\) (ridge) and \(1\) (lasso)</p></td>
numeric between \(0\) (ridge) and \(1\) (lasso)</p></td>
</tr>
<tr>
<th>mnorm, spls, sier, mrce</th>
<th>mnorm, spls, mrce, sier, mtps</th>
<td><p>experimental arguments<strong>:</strong>
logical (requires packages <code>spls</code>, <code>SiER</code>, or <code>MRCE</code>)</p></td>
logical
(require packages <code>spls</code>, <code>MRCE</code>, <code>SiER</code> or <code>MTPS</code>)</p></td>
</tr>
<tr>
<th>cvpred</th>
......
......@@ -67,7 +67,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">joinet</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.3</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.4</span>
</span>
</div>
......
......@@ -74,7 +74,7 @@ in high-dimensional settings." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">joinet</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.3</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.4</span>
</span>
</div>
......
......@@ -69,7 +69,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">joinet</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.3</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.4</span>
</span>
</div>
......@@ -123,8 +123,17 @@
<p>Implements multivariate elastic net regression.</p>
</div>
<pre class="usage"><span class='fu'>joinet</span>(<span class='no'>Y</span>, <span class='no'>X</span>, <span class='kw'>family</span> <span class='kw'>=</span> <span class='st'>"gaussian"</span>, <span class='kw'>nfolds</span> <span class='kw'>=</span> <span class='fl'>10</span>, <span class='kw'>foldid</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>type.measure</span> <span class='kw'>=</span> <span class='st'>"deviance"</span>, <span class='kw'>alpha.base</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>alpha.meta</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='no'>...</span>)</pre>
<pre class="usage"><span class='fu'>joinet</span>(
<span class='no'>Y</span>,
<span class='no'>X</span>,
<span class='kw'>family</span> <span class='kw'>=</span> <span class='st'>"gaussian"</span>,
<span class='kw'>nfolds</span> <span class='kw'>=</span> <span class='fl'>10</span>,
<span class='kw'>foldid</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>type.measure</span> <span class='kw'>=</span> <span class='st'>"deviance"</span>,
<span class='kw'>alpha.base</span> <span class='kw'>=</span> <span class='fl'>1</span>,
<span class='kw'>alpha.meta</span> <span class='kw'>=</span> <span class='fl'>0</span>,
<span class='no'>...</span>
)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
......
......@@ -69,7 +69,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">joinet</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.3</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.4</span>
</span>
</div>
......
......@@ -70,7 +70,7 @@ i.e. the weights for the base learners." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">joinet</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.3</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.4</span>
</span>
</div>
......
......@@ -4,10 +4,25 @@
\alias{cv.joinet}
\title{Model comparison}
\usage{
cv.joinet(Y, X, family = "gaussian", nfolds.ext = 5, nfolds.int = 10,
foldid.ext = NULL, foldid.int = NULL, type.measure = "deviance",
alpha.base = 1, alpha.meta = 0, mnorm = FALSE, spls = FALSE,
sier = FALSE, mrce = FALSE, cvpred = FALSE, ...)
cv.joinet(
Y,
X,
family = "gaussian",
nfolds.ext = 5,
nfolds.int = 10,
foldid.ext = NULL,
foldid.int = NULL,
type.measure = "deviance",
alpha.base = 1,
alpha.meta = 0,
mnorm = FALSE,
spls = FALSE,
mrce = FALSE,
sier = FALSE,
mtps = FALSE,
cvpred = FALSE,
...
)
}
\arguments{
\item{Y}{outputs\strong{:}
......@@ -48,8 +63,9 @@ numeric between \eqn{0} (ridge) and \eqn{1} (lasso)}
\item{alpha.meta}{elastic net mixing parameter for meta learner\strong{:}
numeric between \eqn{0} (ridge) and \eqn{1} (lasso)}
\item{mnorm, spls, sier, mrce}{experimental arguments\strong{:}
logical (requires packages \code{spls}, \code{SiER}, or \code{MRCE})}
\item{mnorm, spls, mrce, sier, mtps}{experimental arguments\strong{:}
logical
(require packages \code{spls}, \code{MRCE}, \code{SiER} or \code{MTPS})}
\item{cvpred}{return cross-validated predicition: logical}
......
......@@ -4,8 +4,17 @@
\alias{joinet}
\title{Multivariate Elastic Net Regression}
\usage{
joinet(Y, X, family = "gaussian", nfolds = 10, foldid = NULL,
type.measure = "deviance", alpha.base = 1, alpha.meta = 0, ...)
joinet(
Y,
X,
family = "gaussian",
nfolds = 10,
foldid = NULL,
type.measure = "deviance",
alpha.base = 1,
alpha.meta = 0,
...
)
}
\arguments{
\item{Y}{outputs\strong{:}
......
......@@ -3,12 +3,15 @@ title: Multivariate Elastic Net Regression
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{article}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
%\VignetteEngine{knitr::rmarkdown}
editor_options:
chunk_output_type: console
---
The `joinet` manuscript is in preparation. Click [here](https://CRAN.R-project.org/package=joinet) for the R package.
## Reference
Armin Rauschenberger and Enrico Glaab (2019). "joinet: predicting correlated outcomes jointly to improve clinical prognosis". *Manuscript in preparation.*
Armin Rauschenberger and Enrico Glaab (2020). "joinet: predicting correlated outcomes jointly to improve clinical prognosis". *Manuscript in preparation.*
......@@ -123,21 +123,27 @@ cv.joinet(Y=Y,X=X,family=family)
## Reference
Armin Rauschenberger and Enrico Glaab (2019). "joinet: predicting correlated outcomes jointly to improve clinical prognosis". *Manuscript in preparation.*
Armin Rauschenberger and Enrico Glaab (2020). "joinet: predicting correlated outcomes jointly to improve clinical prognosis". *Manuscript in preparation.*
<!--
```{r,eval=FALSE}
#install.packages("MTPS")
data("HIV",package="MTPS",verbose=TRUE)
loss1 <- cv.joinet(Y=YY,X=XX,mnorm=TRUE,mtps=TRUE)
#install.packages("plsgenomics")
data(Ecoli,package="plsgenomics")
X <- Ecoli$CONNECdata
Y <- Ecoli$GEdata
loss <- cv.joinet(Y=Y,X=X)
loss2 <- cv.joinet(Y=Y,X=X,mnorm=TRUE,mtps=TRUE)
#install.packages("BiocManager")
#BiocManager::install("mixOmics")
data(liver.toxicity,package="mixOmics")
X <- liver.toxicity$gene
Y <- liver.toxicity$clinic
Y$Cholesterol.mg.dL. <- -Y$Cholesterol.mg.dL.
loss <- cv.joinet(Y=Y,X=X)
X <- as.matrix(liver.toxicity$gene)
Y <- as.matrix(liver.toxicity$clinic)
Y[,"Cholesterol.mg.dL."] <- -Y[,"Cholesterol.mg.dL."]
loss3 <- cv.joinet(Y=Y,X=X,mnorm=TRUE,mtps=TRUE)
```
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Multivariate Elastic Net Regression</title>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css" data-origin="pandoc">
a.sourceLine { display: inline-block; line-height: 1.25; }
a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; }
a.sourceLine:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode { white-space: pre; position: relative; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
code.sourceCode { white-space: pre-wrap; }
a.sourceLine { text-indent: -1em; padding-left: 1em; }
}
pre.numberSource a.sourceLine
{ position: relative; left: -4em; }
pre.numberSource a.sourceLine::before
{ content: attr(title);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; pointer-events: all; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;