joinet.Rd 2.07 KB
Newer Older
Armin Rauschenberger's avatar
Armin Rauschenberger committed
1 2
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
Armin Rauschenberger's avatar
Armin Rauschenberger committed
3 4 5
\name{joinet}
\alias{joinet}
\alias{joinet-package}
Armin Rauschenberger's avatar
Armin Rauschenberger committed
6 7
\title{Multivariate Elastic Net Regression}
\usage{
Armin Rauschenberger's avatar
Armin Rauschenberger committed
8
joinet(Y, X, family = "gaussian", nfolds = 10, foldid = NULL,
Armin Rauschenberger's avatar
Armin Rauschenberger committed
9
  type.measure = "deviance", alpha.base = 0, alpha.meta = 0, ...)
Armin Rauschenberger's avatar
Armin Rauschenberger committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
}
\arguments{
\item{Y}{outputs\strong{:}
numeric matrix with \eqn{n} rows (samples)
and \eqn{q} columns (variables),
with positive correlation (see details)}

\item{X}{inputs\strong{:}
numeric matrix with \eqn{n} rows (samples)
and \eqn{p} columns (variables)}

\item{family}{distribution\strong{:}
vector of length \eqn{1} or \eqn{q} with entries
\code{"gaussian"}, \code{"binomial"} or \code{"poisson"}}

\item{nfolds}{number of folds}

\item{foldid}{fold identifiers\strong{:}
vector of length \eqn{n} with entries between \eqn{1} and \code{nfolds};
or \code{NULL} (balance)}

\item{type.measure}{loss function\strong{:}
vector of length \eqn{1} or \eqn{q} with entries
\code{"deviance"}, \code{"class"}, \code{"mse"} or \code{"mae"}
(see \code{\link[glmnet]{cv.glmnet}})}

\item{alpha.base}{elastic net mixing parameter for base learners\strong{:}
numeric between \eqn{0} (ridge) and \eqn{1} (lasso)}

\item{alpha.meta}{elastic net mixing parameter for meta learner\strong{:}
Armin Rauschenberger's avatar
Armin Rauschenberger committed
40
numeric between \eqn{0} (ridge) and \eqn{1} (lasso)}
Armin Rauschenberger's avatar
Armin Rauschenberger committed
41 42 43 44 45 46 47 48 49

\item{...}{further arguments passed to \code{\link[glmnet]{glmnet}}}
}
\description{
Implements multivariate elastic net regression.
}
\details{
The \eqn{q} outcomes should be positively correlated.
Avoid negative correlations by changing the sign of the variable.
Armin Rauschenberger's avatar
Armin Rauschenberger committed
50 51 52 53 54 55

elastic net mixing parameters:
\code{alpha.base} controls input-output effects,
\code{alpha.meta} controls output-output effects;
ridge (\eqn{0}) renders dense models,
lasso (\eqn{1}) renders sparse models
Armin Rauschenberger's avatar
Armin Rauschenberger committed
56 57 58 59 60
}
\examples{
n <- 30; q <- 2; p <- 20
Y <- matrix(rnorm(n*q),nrow=n,ncol=q)
X <- matrix(rnorm(n*p),nrow=n,ncol=p)
Armin Rauschenberger's avatar
Armin Rauschenberger committed
61
object <- joinet(Y=Y,X=X)
Armin Rauschenberger's avatar
Armin Rauschenberger committed
62 63 64 65 66 67 68

}
\references{
A Rauschenberger, E Glaab (2019)
"Multivariate elastic net regression through stacked generalisation"
\emph{Manuscript in preparation.}
}