R/netreg.R
edgenet-methods.RdFit a graph-regularized linear regression model using
edge-penalization. The coefficients are computed using graph-prior
knowledge in the form of one/two affinity matrices. Graph-regularization is
an extension to previously introduced regularization techniques,
such as the LASSO. See the vignette for details on the objective function of
the model:
vignette("edgenet", package="netReg")
edgenet(
X,
Y,
G.X = NULL,
G.Y = NULL,
lambda = 0,
psigx = 0,
psigy = 0,
thresh = 1e-05,
maxit = 1e+05,
learning.rate = 0.01,
family = gaussian
)
# S4 method for matrix,numeric
edgenet(
X,
Y,
G.X = NULL,
G.Y = NULL,
lambda = 0,
psigx = 0,
psigy = 0,
thresh = 1e-05,
maxit = 1e+05,
learning.rate = 0.01,
family = gaussian
)
# S4 method for matrix,matrix
edgenet(
X,
Y,
G.X = NULL,
G.Y = NULL,
lambda = 0,
psigx = 0,
psigy = 0,
thresh = 1e-05,
maxit = 1e+05,
learning.rate = 0.01,
family = gaussian
)input matrix, of dimension (n x p)
where n is the number of observations and p is the number
of covariables. Each row is an observation vector.
output matrix, of dimension (n x q)
where n is the number of observations and q is the number
of response variables. Each row is an observation vector.
non-negativ affinity matrix for X, of dimensions
(p x p) where p is the number of covariables
non-negativ affinity matrix for Y, of dimensions
(q x q) where q is the number of responses
numerical shrinkage parameter for LASSO.
numerical shrinkage parameter for graph-regularization
of G.X
numerical shrinkage parameter for graph-regularization
of G.Y
numerical threshold for optimizer
maximum number of iterations for optimizer
(integer)
step size for Adam optimizer (numerical)
family of response, e.g. gaussian or binomial
An object of class edgenet
the estimated (p x q)-dimensional
coefficient matrix B.hat
the estimated (q x 1)-dimensional
vector of intercepts
regularization parameters
regularization parameter lambda)
regularization parameter psigx
regularization parameter psigy
a description of the error distribution and link function
to be used. Can be a pareg::family
function or a character string
naming a family function, e.g. gaussian or "gaussian".
the call that produced the object
Cheng, Wei and Zhang, Xiang and Guo, Zhishan and Shi, Yu and Wang, Wei
(2014),
Graph-regularized dual Lasso for robust eQTL mapping.
Bioinformatics
X <- matrix(rnorm(100 * 10), 100, 10)
b <- matrix(rnorm(100), 10)
G.X <- abs(rWishart(1, 10, diag(10))[, , 1])
G.Y <- abs(rWishart(1, 10, diag(10))[, , 1])
diag(G.X) <- diag(G.Y) <- 0
# estimate the parameters of a Gaussian model
Y <- X %*% b + matrix(rnorm(100 * 10), 100)
## dont use affinity matrices
fit <- edgenet(X = X, Y = Y, family = gaussian, maxit = 10)
## only provide one matrix
fit <- edgenet(
X = X,
Y = Y,
G.X = G.X,
psigx = 1,
family = gaussian,
maxit = 10
)
## use two matrices
fit <- edgenet(X = X, Y = Y, G.X = G.X, G.Y, family = gaussian, maxit = 10)
## if Y is vectorial, we cannot use an affinity matrix for Y
fit <- edgenet(X = X, Y = Y[, 1], G.X = G.X, family = gaussian, maxit = 10)