Commit 11334fc8 authored by Armin Rauschenberger's avatar Armin Rauschenberger

automation

parent 80f568bf
This diff is collapsed.
......@@ -22,8 +22,8 @@
#' to open the vignette.
#'
#' @references
#' A Rauschenberger, E Glaab, and MA van de Wiel (2019).
#' "Improved elastic net regression through stacked generalisation".
#' A Rauschenberger, E Glaab, and MA van de Wiel (2020).
#' Predictive and interpretable models via the stacked elastic net".
#' \emph{Manuscript in preparation}.
#'
#' \email{armin.rauschenberger@uni.lu}
......
......@@ -40,4 +40,4 @@ devtools::install_github("rauschenberger/starnet")
## Reference
A Rauschenberger, E Glaab, MA van de Wiel (2019). "Predictive and interpretable models via the stacked elastic net". *Manuscript in preparation.*
A Rauschenberger, E Glaab, MA van de Wiel (2020). "Predictive and interpretable models via the stacked elastic net". *Manuscript in preparation.*
......@@ -32,6 +32,6 @@ devtools::install_github("rauschenberger/starnet")
## Reference
A Rauschenberger, E Glaab, MA van de Wiel (2019). “Predictive and
A Rauschenberger, E Glaab, MA van de Wiel (2020). “Predictive and
interpretable models via the stacked elastic net”. *Manuscript in
preparation.*
......@@ -90,7 +90,7 @@
<div id="reference" class="section level2">
<h2 class="hasAnchor">
<a href="#reference" class="anchor"></a>Reference</h2>
<p>A Rauschenberger, E Glaab, and MA van de Wiel (2019). “Improved elastic net regression through stacked generalisation”. <em>Manuscript in preparation.</em></p>
<p>A Rauschenberger, E Glaab, and MA van de Wiel (2020). “Predictive and interpretable models via the stacked elastic net”. <em>Manuscript in preparation.</em></p>
</div>
</div>
......
......@@ -94,7 +94,7 @@
<div id="reference" class="section level2">
<h2 class="hasAnchor">
<a href="#reference" class="anchor"></a>Reference</h2>
<p>A Rauschenberger, E Glaab, MA van de Wiel (2019). “Predictive and interpretable models via the stacked elastic net”. <em>Manuscript in preparation.</em></p>
<p>A Rauschenberger, E Glaab, MA van de Wiel (2020). “Predictive and interpretable models via the stacked elastic net”. <em>Manuscript in preparation.</em></p>
</div>
</div>
......
......@@ -137,7 +137,7 @@
</tr>
<tr>
<th>nzero</th>
<td><p>number of non-zero coefficients<strong>:</strong>
<td><p>maximum number of non-zero coefficients<strong>:</strong>
positive integer, or <code>NULL</code></p></td>
</tr>
<tr>
......
docs/reference/cv.starnet-1.png

8 KB | W: | H:

docs/reference/cv.starnet-1.png

8.53 KB | W: | H:

docs/reference/cv.starnet-1.png
docs/reference/cv.starnet-1.png
docs/reference/cv.starnet-1.png
docs/reference/cv.starnet-1.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
......@@ -146,7 +146,7 @@ and \(p\) columns (variables)</p></td>
</tr>
<tr>
<th>nzero</th>
<td><p>number of non-zero coefficients<strong>:</strong>
<td><p>maximum number of non-zero coefficients<strong>:</strong>
positive integer, or <code>NULL</code></p></td>
</tr>
<tr>
......
docs/reference/starnet-package-1.png

8.92 KB | W: | H:

docs/reference/starnet-package-1.png

8.91 KB | W: | H:

docs/reference/starnet-package-1.png
docs/reference/starnet-package-1.png
docs/reference/starnet-package-1.png
docs/reference/starnet-package-1.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -141,8 +141,8 @@ Type <code><a href='../articles/starnet.html'>vignette("starnet")</a></code> or
to open the vignette.</p>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p>A Rauschenberger, E Glaab, and MA van de Wiel (2019).
"Improved elastic net regression through stacked generalisation".
<p>A Rauschenberger, E Glaab, and MA van de Wiel (2020).
Predictive and interpretable models via the stacked elastic net".
<em>Manuscript in preparation</em>.</p>
<p><a href='mailto:armin.rauschenberger@uni.lu'>armin.rauschenberger@uni.lu</a></p>
......@@ -168,7 +168,7 @@ to open the vignette.</p>
<span class='co'># vector "beta": slopes</span>
<span class='co'>#--- model comparison ---</span>
<span class='no'>loss</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='cv.starnet.html'>cv.starnet</a></span>(<span class='kw'>y</span><span class='kw'>=</span><span class='no'>y</span>,<span class='kw'>X</span><span class='kw'>=</span><span class='no'>X</span>)</div><div class='output co'>#&gt; <span class='message'>alpha1 1.25 </span></div><div class='output co'>#&gt; <span class='message'>-0.243 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</span></div><div class='output co'>#&gt; <span class='message'>alpha1 1.03 </span></div><div class='output co'>#&gt; <span class='message'>-0.196 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</span></div><div class='output co'>#&gt; <span class='message'>alpha1 1.22 </span></div><div class='output co'>#&gt; <span class='message'>-0.197 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</span></div><div class='output co'>#&gt; <span class='message'>alpha1 0.95 </span></div><div class='output co'>#&gt; <span class='message'>-0.007 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.913</span></div><div class='output co'>#&gt; <span class='message'>alpha1 1.14 </span></div><div class='output co'>#&gt; <span class='message'>-0.328 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</span></div><div class='output co'>#&gt; <span class='message'>alpha1 1.3 </span></div><div class='output co'>#&gt; <span class='message'>-0.266 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</span></div><div class='output co'>#&gt; <span class='message'>alpha1 1.15 </span></div><div class='output co'>#&gt; <span class='message'>-0.19 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</span></div><div class='output co'>#&gt; <span class='message'>alpha1 1.34 </span></div><div class='output co'>#&gt; <span class='message'>-0.252 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</span></div><div class='output co'>#&gt; <span class='message'>alpha1 1.33 </span></div><div class='output co'>#&gt; <span class='message'>-0.236 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</span></div><div class='output co'>#&gt; <span class='message'>alpha1 1.13 </span></div><div class='output co'>#&gt; <span class='message'>-0.264 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</span></div><div class='img'><img src='starnet-package-1.png' alt='' width='700' height='433' /></div><div class='input'># cross-validated loss for different alpha,
<span class='no'>loss</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='cv.starnet.html'>cv.starnet</a></span>(<span class='kw'>y</span><span class='kw'>=</span><span class='no'>y</span>,<span class='kw'>X</span><span class='kw'>=</span><span class='no'>X</span>)</div><div class='output co'>#&gt; <span class='message'>alpha1 1.19 </span></div><div class='output co'>#&gt; <span class='message'>-0.12 _ 0 0 0 0 0 0 0 0.069 0 0 0.371 0 0 0 0 0 0 0 0 0 0</span></div><div class='output co'>#&gt; <span class='message'>alpha1 1.07 </span></div><div class='output co'>#&gt; <span class='message'>-0.196 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</span></div><div class='output co'>#&gt; <span class='message'>alpha1 1.23 </span></div><div class='output co'>#&gt; <span class='message'>-0.197 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</span></div><div class='output co'>#&gt; <span class='message'>alpha1 0.96 </span></div><div class='output co'>#&gt; <span class='message'>-0.021 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.029</span></div><div class='output co'>#&gt; <span class='message'>alpha1 1.14 </span></div><div class='output co'>#&gt; <span class='message'>-0.328 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</span></div><div class='output co'>#&gt; <span class='message'>alpha1 1.21 </span></div><div class='output co'>#&gt; <span class='message'>-0.007 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.005</span></div><div class='output co'>#&gt; <span class='message'>alpha1 1.13 </span></div><div class='output co'>#&gt; <span class='message'>-0.112 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0.275 0 0.066 0 0</span></div><div class='output co'>#&gt; <span class='message'>alpha1 1.14 </span></div><div class='output co'>#&gt; <span class='message'>-0.07 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.604 0 0 0 0 0 0</span></div><div class='output co'>#&gt; <span class='message'>alpha1 1.22 </span></div><div class='output co'>#&gt; <span class='message'>-0.131 _ 0 0 0 0 0 0 0.465 0 0 0 0 0 0 0 0 0 0 0 0 0 0</span></div><div class='output co'>#&gt; <span class='message'>alpha1 1.13 </span></div><div class='output co'>#&gt; <span class='message'>-0.264 _ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</span></div><div class='img'><img src='starnet-package-1.png' alt='' width='700' height='433' /></div><div class='input'># cross-validated loss for different alpha,
# and for tuning and stacking
</div></pre>
......
......@@ -125,16 +125,16 @@
<pre class="usage"><span class='fu'>starnet</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'>nalpha</span> <span class='kw'>=</span> <span class='fl'>21</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='kw'>NULL</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.meta</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>grouped</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>penalty.factor</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>intercept</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>upper.limit</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>unit.sum</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='no'>...</span>)</pre>
<span class='kw'>alpha.meta</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>penalty.factor</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>intercept</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>upper.limit</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>unit.sum</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='no'>...</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>y</th>
<td><p>numeric response<strong>:</strong>
vector of length \(n\)</p></td>
<td><p>response<strong>:</strong>
numeric vector of length \(n\)</p></td>
</tr>
<tr>
<th>X</th>
......@@ -153,7 +153,8 @@ and \(p\) columns (variables)</p></td>
<tr>
<th>alpha</th>
<td><p>elastic net mixing parameters<strong>:</strong>
vector of values between \(0\) (ridge) and \(1\) (lasso);
vector of length <code>nalpha</code> with entries
between \(0\) (ridge) and \(1\) (lasso);
or <code>NULL</code> (equidistance)</p></td>
</tr>
<tr>
......@@ -163,7 +164,7 @@ or <code>NULL</code> (equidistance)</p></td>
<tr>
<th>foldid</th>
<td><p>fold identifiers<strong>:</strong>
vector with entries between \(1\) and <code>nfolds</code>;
vector of length \(n\) with entries between \(1\) and <code>nfolds</code>;
or <code>NULL</code> (balance)</p></td>
</tr>
<tr>
......@@ -174,21 +175,22 @@ character "deviance", "class", "mse" or "mae"
</tr>
<tr>
<th>alpha.meta</th>
<td><p>elastic net mixing parameters for stacking<strong>:</strong>
vector of values between \(0\) (ridge) and \(1\) (lasso),
<em>see details</em></p></td>
</tr>
<tr>
<th>grouped</th>
<td><p>logical</p></td>
<td><p>meta-learner<strong>:</strong>
value between \(0\) (ridge) and \(1\) (lasso)
for elastic net regularisation;
<code>NA</code> for convex combination</p></td>
</tr>
<tr>
<th>penalty.factor</th>
<td><p>penalty factors for base-learners</p></td>
<td><p>differential shrinkage<strong>:</strong>
vector of length \(n\) with entries
between \(0\) (include) and \(Inf\) (exclude),
or <code>NULL</code> (all \(1\))</p></td>
</tr>
<tr>
<th>intercept, upper.limit, unit.sum</th>
<td><p>settings for meta-learner<strong>:</strong> logical</p></td>
<td><p>settings for meta-learner<strong>:</strong> logical,
or <code>NULL</code> (default depends on <code>alpha.meta</code>)</p></td>
</tr>
<tr>
<th>...</th>
......@@ -198,13 +200,14 @@ vector of values between \(0\) (ridge) and \(1\) (lasso),
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>Combine predictions from <em>some</em> <code>alpha</code> with <code>alpha.meta</code>\(=1\),
or from <em>all</em> <code>alpha</code> with <code>alpha.meta</code>\(=0\).
We recommend to use <code>alpha.meta</code>\(=0\) (default) for stability.</p>
<p>For posthoc feature selection, set the
argument <code>nzero</code> in functions
<code><a href='https://rdrr.io/r/stats/coef.html'>coef</a></code> and <code><a href='https://rdrr.io/r/stats/predict.html'>predict</a></code>
to the maximum number of non-zero coefficients.</p>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p>A Rauschenberger, E Glaab, and MA van de Wiel (2019)
"Improved elastic net regression through stacked generalisation"
<p>A Rauschenberger, E Glaab, and MA van de Wiel (2020).
"Predictive and interpretable models via the stacked elastic net".
<em>Manuscript in preparation.</em></p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
......
......@@ -9,7 +9,7 @@
\arguments{
\item{object}{\link[starnet]{starnet} object}
\item{nzero}{number of non-zero coefficients\strong{:}
\item{nzero}{maximum number of non-zero coefficients\strong{:}
positive integer, or \code{NULL}}
\item{...}{further arguments (not applicable)}
......
......@@ -7,12 +7,12 @@
cv.starnet(y, X, family = "gaussian", nalpha = 21, alpha = NULL,
nfolds.ext = 10, nfolds.int = 10, foldid.ext = NULL,
foldid.int = NULL, type.measure = "deviance", alpha.meta = 1,
grouped = TRUE, nzero = NULL, intercept = NULL,
upper.limit = NULL, unit.sum = NULL, ...)
nzero = NULL, intercept = NULL, upper.limit = NULL,
unit.sum = NULL, ...)
}
\arguments{
\item{y}{numeric response\strong{:}
vector of length \eqn{n}}
\item{y}{response\strong{:}
numeric vector of length \eqn{n}}
\item{X}{covariates\strong{:}
numeric matrix with \eqn{n} rows (samples)
......@@ -23,30 +23,39 @@ and \eqn{p} columns (variables)}
\item{nalpha}{number of \code{alpha} values}
\item{alpha}{elastic net mixing parameters\strong{:}
vector of values between \eqn{0} (ridge) and \eqn{1} (lasso);
vector of length \code{nalpha} with entries
between \eqn{0} (ridge) and \eqn{1} (lasso);
or \code{NULL} (equidistance)}
\item{nfolds.ext, nfolds.int, foldid.ext, foldid.int}{(number of) external/internal folds}
\item{nfolds.ext, nfolds.int, foldid.ext, foldid.int}{number of folds (\code{nfolds})\strong{:}
positive integer;
fold identifiers (\code{foldid})\strong{:}
vector of length \eqn{n} with entries between \eqn{1} and \code{nfolds},
or \code{NULL},
for hold-out (single split) instead of cross-validation (multiple splits)\strong{:}
set to \eqn{0} for training and to \eqn{1} for testing samples}
\item{type.measure}{loss function\strong{:}
character "deviance", "class", "mse" or "mae"
(see \code{\link[glmnet]{cv.glmnet}})}
\item{alpha.meta}{elastic net mixing parameters for stacking\strong{:}
vector of values between \eqn{0} (ridge) and \eqn{1} (lasso),
\emph{see details}}
\item{grouped}{logical}
\item{alpha.meta}{meta-learner\strong{:}
value between \eqn{0} (ridge) and \eqn{1} (lasso)
for elastic net regularisation;
\code{NA} for convex combination}
\item{nzero}{number of non-zero coefficients\strong{:}
scalar/vector including positive integer(s) or \code{NA};
or \code{NULL} (no posthoc feature selection)}
\item{intercept}{settings for meta-learner\strong{:} logical}
\item{intercept}{settings for meta-learner\strong{:} logical,
or \code{NULL} (default depends on \code{alpha.meta})}
\item{upper.limit}{settings for meta-learner\strong{:} logical}
\item{upper.limit}{settings for meta-learner\strong{:} logical,
or \code{NULL} (default depends on \code{alpha.meta})}
\item{unit.sum}{settings for meta-learner\strong{:} logical}
\item{unit.sum}{settings for meta-learner\strong{:} logical,
or \code{NULL} (default depends on \code{alpha.meta})}
\item{...}{further arguments (not applicable)}
}
......
......@@ -16,7 +16,7 @@ and \eqn{p} columns (variables)}
\item{type}{character "link" or "response"}
\item{nzero}{number of non-zero coefficients\strong{:}
\item{nzero}{maximum number of non-zero coefficients\strong{:}
positive integer, or \code{NULL}}
\item{...}{further arguments (not applicable)}
......
......@@ -48,8 +48,8 @@ loss <- cv.starnet(y=y,X=X)
}
\references{
A Rauschenberger, E Glaab, and MA van de Wiel (2019).
"Improved elastic net regression through stacked generalisation".
A Rauschenberger, E Glaab, and MA van de Wiel (2020).
Predictive and interpretable models via the stacked elastic net".
\emph{Manuscript in preparation}.
\email{armin.rauschenberger@uni.lu}
......
......@@ -6,12 +6,12 @@
\usage{
starnet(y, X, family = "gaussian", nalpha = 21, alpha = NULL,
nfolds = 10, foldid = NULL, type.measure = "deviance",
alpha.meta = 1, grouped = TRUE, penalty.factor = NULL,
intercept = NULL, upper.limit = NULL, unit.sum = NULL, ...)
alpha.meta = 1, penalty.factor = NULL, intercept = NULL,
upper.limit = NULL, unit.sum = NULL, ...)
}
\arguments{
\item{y}{numeric response\strong{:}
vector of length \eqn{n}}
\item{y}{response\strong{:}
numeric vector of length \eqn{n}}
\item{X}{covariates\strong{:}
numeric matrix with \eqn{n} rows (samples)
......@@ -22,28 +22,32 @@ and \eqn{p} columns (variables)}
\item{nalpha}{number of \code{alpha} values}
\item{alpha}{elastic net mixing parameters\strong{:}
vector of values between \eqn{0} (ridge) and \eqn{1} (lasso);
vector of length \code{nalpha} with entries
between \eqn{0} (ridge) and \eqn{1} (lasso);
or \code{NULL} (equidistance)}
\item{nfolds}{number of folds}
\item{foldid}{fold identifiers\strong{:}
vector with entries between \eqn{1} and \code{nfolds};
vector of length \eqn{n} with entries between \eqn{1} and \code{nfolds};
or \code{NULL} (balance)}
\item{type.measure}{loss function\strong{:}
character "deviance", "class", "mse" or "mae"
(see \code{\link[glmnet]{cv.glmnet}})}
\item{alpha.meta}{elastic net mixing parameters for stacking\strong{:}
vector of values between \eqn{0} (ridge) and \eqn{1} (lasso),
\emph{see details}}
\item{alpha.meta}{meta-learner\strong{:}
value between \eqn{0} (ridge) and \eqn{1} (lasso)
for elastic net regularisation;
\code{NA} for convex combination}
\item{grouped}{logical}
\item{penalty.factor}{differential shrinkage\strong{:}
vector of length \eqn{n} with entries
between \eqn{0} (include) and \eqn{Inf} (exclude),
or \code{NULL} (all \eqn{1})}
\item{penalty.factor}{penalty factors for base-learners}
\item{intercept, upper.limit, unit.sum}{settings for meta-learner\strong{:} logical}
\item{intercept, upper.limit, unit.sum}{settings for meta-learner\strong{:} logical,
or \code{NULL} (default depends on \code{alpha.meta})}
\item{...}{further arguments passed to \code{\link[glmnet]{glmnet}}}
}
......@@ -51,9 +55,10 @@ vector of values between \eqn{0} (ridge) and \eqn{1} (lasso),
Implements stacked elastic net regression.
}
\details{
Combine predictions from \emph{some} \code{alpha} with \code{alpha.meta}\eqn{=1},
or from \emph{all} \code{alpha} with \code{alpha.meta}\eqn{=0}.
We recommend to use \code{alpha.meta}\eqn{=0} (default) for stability.
For posthoc feature selection, set the
argument \code{nzero} in functions
\code{\link{coef}} and \code{\link{predict}}
to the maximum number of non-zero coefficients.
}
\examples{
set.seed(1)
......@@ -64,7 +69,7 @@ object <- starnet::starnet(y=y,X=X,family="gaussian")
}
\references{
A Rauschenberger, E Glaab, and MA van de Wiel (2020)
"Improved elastic net regression through stacked generalisation"
A Rauschenberger, E Glaab, and MA van de Wiel (2020).
"Predictive and interpretable models via the stacked elastic net".
\emph{Manuscript in preparation.}
}
......@@ -11,6 +11,6 @@ The `starnet` manuscript is in preparation. Click [here](https://CRAN.R-project.
## Reference
A Rauschenberger, E Glaab, and MA van de Wiel (2019).
"Improved elastic net regression through stacked generalisation".
A Rauschenberger, E Glaab, and MA van de Wiel (2020).
"Predictive and interpretable models via the stacked elastic net".
*Manuscript in preparation.*
......@@ -28,6 +28,6 @@ or the latest development version from [GitHub](https://github.com/rauschenberge
devtools::install_github("rauschenberger/starnet")
```
A Rauschenberger, E Glaab, and MA van de Wiel (2019).
"Improved elastic net regression through stacked generalisation".
A Rauschenberger, E Glaab, and MA van de Wiel (2020).
"Predictive and interpretable models via the stacked elastic net".
*Manuscript in preparation.*
<!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>Stacked Elastic Net</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;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
a.sourceLine::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>
<script>
// apply pandoc div.sourceCode style to pre.sourceCode instead
(function() {
var sheets = document.styleSheets;
for (var i = 0; i < sheets.length; i++) {
if (sheets[i].ownerNode.dataset["origin"] !== "pandoc") continue;
try { var rules = sheets[i].cssRules; } catch (e) { continue; }
for (var j = 0; j < rules.length; j++) {
var rule = rules[j];
// check if there is a div.sourceCode rule
if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") continue;
var style = rule.style.cssText;
// check if color or background-color is set
if (rule.style.color === '' && rule.style.backgroundColor === '') continue;
// replace div.sourceCode by a pre.sourceCode rule
sheets[i].deleteRule(j);
sheets[i].insertRule('pre.sourceCode{' + style + '}', j);
}
}
})();
</script>
<style type="text/css">body {
background-color: #fff;
margin: 1em auto;
max-width: 700px;
overflow: visible;
padding-left: 2em;
padding-right: 2em;
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.35;
}
#header {
text-align: center;
}
#TOC {
clear: both;
margin: 0 0 10px 10px;
padding: 4px;
width: 400px;
border: 1px solid #CCCCCC;
border-radius: 5px;
background-color: #f6f6f6;
font-size: 13px;
line-height: 1.3;
}
#TOC .toctitle {
font-weight: bold;
font-size: 15px;
margin-left: 5px;
}
#TOC ul {
padding-left: 40px;
margin-left: -1.5em;
margin-top: 5px;
margin-bottom: 5px;
}
#TOC ul ul {
margin-left: -2em;
}
#TOC li {
line-height: 16px;
}
table {
margin: 1em auto;
border-width: 1px;
border-color: #DDDDDD;
border-style: outset;
border-collapse: collapse;
}
table th {
border-width: 2px;
padding: 5px;
border-style: inset;
}
table td {
border-width: 1px;
border-style: inset;
line-height: 18px;
padding: 5px 5px;
}
table, table th, table td {
border-left-style: none;
border-right-style: none;
}
table thead, table tr.even {
background-color: #f7f7f7;
}
p {
margin: 0.5em 0;
}
blockquote {
background-color: #f6f6f6;
padding: 0.25em 0.75em;
}
hr {
border-style: solid;
border: none;
border-top: 1px solid #777;
margin: 28px 0;
}
dl {
margin-left: 0;
}
dl dd {
margin-bottom: 13px;
margin-left: 13px;
}
dl dt {
font-weight: bold;
}
ul {
margin-top: 0;
}
ul li {
list-style: circle outside;
}
ul ul {
margin-bottom: 0;
}
pre, code {
background-color: #f7f7f7;
border-radius: 3px;
color: #333;
white-space: pre-wrap;
}
pre {
border-radius: 3px;
margin: 5px 0px 10px 0px;
padding: 10px;
}
pre:not([class]) {
background-color: #f7f7f7;
}
code {
font-family: Consolas, Monaco, 'Courier New', monospace;
font-size: 85%;
}
p > code, li > code {
padding: 2px 0px;
}
div.figure {
text-align: center;
}
img {
background-color: #FFFFFF;
padding: 2px;
border: 1px solid #DDDDDD;
border-radius: 3px;
border: 1px solid #CCCCCC;
margin: 0 5px;
}
h1 {
margin-top: 0;
font-size: 35px;
line-height: 40px;
}
h2 {
border-bottom: 4px solid #f7f7f7;
padding-top: 10px;
padding-bottom: 2px;
font-size: 145%;
}
h3 {
border-bottom: 2px solid #f7f7f7;
padding-top: 10px;
font-size: 120%;
}
h4 {
border-bottom: 1px solid #f7f7f7;
margin-left: 8px;
font-size: 105%;
}
h5, h6 {
border-bottom: 1px solid #ccc;
font-size: 105%;
}
a {
color: #0033dd;
text-decoration: none;
}
a:hover {
color: #6666ff; }
a:visited {
color: #800080; }
a:visited:hover {
color: #BB00BB; }
a[href^="http:"] {
text-decoration: underline; }
a[href^="https:"] {
text-decoration: underline; }
code > span.kw { color: #555; font-weight: bold; }
code > span.dt { color: #902000; }
code > span.dv { color: #40a070; }
code > span.bn { color: #d14; }
code > span.fl { color: #d14; }
code > span.ch { color: #d14; }
code > span.st { color: #d14; }
code > span.co { color: #888888; font-style: italic; }
code > span.ot { color: #007020; }
code > span.al { color: #ff0000; font-weight: bold; }
code > span.fu { color: #900; font-weight: bold; } code > span.er { color: #a61717; background-color: #e3d2d2; }
</style>
</head>
<body>
<h1 class="title toc-ignore">Stacked Elastic Net</h1>
<div id="installation" class="section level2">
<h2>Installation</h2>
<p>Install the current release from <a href="https://CRAN.R-project.org/package=starnet">CRAN</a>:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="kw">install.packages</span>(<span class="st">&quot;starnet&quot;</span>)</a></code></pre></div>
<p>or the latest development version from <a href="https://github.com/rauschenberger/starnet">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(&quot;devtools&quot;)</span></a>
<a class="sourceLine" id="cb2-2" title="2">devtools<span class="op">::</span><span class="kw">install_github</span>(<span class="st">&quot;rauschenberger/starnet&quot;</span>)</a></code></pre></div>
<p>A Rauschenberger, E Glaab, and MA van de Wiel (2020). “Predictive and interpretable models via the stacked elastic net”. <em>Manuscript in preparation.</em></p>
</div>
<!-- code folding -->
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {