| orthoMTL | R Documentation |
This function solves a multi-task problem where relationships between tasks can be complex
orthoMTL(
X,
Y,
lambda = 1,
step_size = 0.1,
tol = 1e-05,
stop_no_improve = 100,
max_iter = 1e+06,
W_0 = NULL,
seed = NULL,
K = NULL,
disjoint = FALSE,
logistic = FALSE,
alpha = 0,
schedule = c("sqrt", "log", "const", "linear"),
survival = FALSE,
censored.mat = NULL,
verbose = 0
)
X |
a matrix of predictor variables with dimensions n x p |
Y |
a matrix of response variables with dimensions n x numTasks, where numTasks is the number of response variables. NAs can be used for censored data. |
lambda |
the regularization parameter for the OrthoPen penalty, default is 1 |
step_size |
the step size for updating the regression coefficients in gradient descent, default is 0.1 |
tol |
Convergence tolerance. The algorithm stops when the
improvement in the objective function is less than |
stop_no_improve |
the number of iterations without improvement in the objective function to trigger convergence, default is 100 |
max_iter |
the maximum number of iterations, default is 1e+06 |
W_0 |
a matrix of initial values for the regression coefficients, default is NULL, as not provided and will be randomly attributed |
seed |
an optional random seed for reproducibility, default is
|
K |
a constraint matrix of weights to adjust the OrthoPen penalty, default is an identity matrix with dimensions numTasks x numTasks |
disjoint |
a logical value indicating whether the response variables should have disjoint supports, default is FALSE |
logistic |
a logical value indicating whether logistic regression should be used instead of linear regression, default is FALSE |
alpha |
the elastic-net mixing parameter in |
schedule |
Character; the gradient-step decay schedule – how the
per-iteration scale grows with the iteration index
The default |
survival |
a logical value indicating whether survival analysis should be performed, default is FALSE |
censored.mat |
a matrix indicating whether observations are censored, used only if survival=TRUE |
verbose |
the level of verbosity, default is 0 (no messages) |
a list containing the following elements:
B |
a matrix of regression coefficients with dimensions p x numTasks |
obj |
the final objective function when algorithms stops |
imax |
the number of iterations |
Kevin Vervier, Pierre Mahé, Alexandre d’Aspremont, Jean-Baptiste Veyrieras, Jean-Philippe Vert (2014). On learning matrices with orthogonal columns or disjoint supports. https://hal.science/hal-00985654/file/learningDisjointSupports.pdf
# Regression with orthogonal columns
set.seed(42)
n <- 100; p <- 10; n_tasks <- 3
X <- matrix(rnorm(n * p), n, p)
W_true <- qr.Q(qr(matrix(rnorm(p * n_tasks), p, n_tasks)))
Y <- X %*% W_true + matrix(rnorm(n * n_tasks), n) * 0.1
K <- matrix(1, n_tasks, n_tasks)
diag(K) <- 0.5
fit <- orthoMTL(X, Y, lambda = 1e-3, K = K, disjoint = FALSE)
fit$B # coefficient matrix
fit$converged # did optimisation converge?
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.