MTL: Train a multi-task learning model.

Description Usage Arguments Value Examples

View source: R/MTL.R

Description

Train a multi-task learning model.

Usage

1
2
3
MTL(X, Y, type = "Classification", Regularization = "L21",
  Lam1 = 0.1, Lam1_seq = NULL, Lam2 = 0, opts = list(init = 0, tol
  = 10^-3, maxIter = 1000), G = NULL, k = 2)

Arguments

X

A set of feature matrices

Y

A set of responses, could be binary (classification problem) or continues (regression problem). The valid value of binary outcome \in\{1, -1\}

type

The type of problem, must be Regression or Classification

Regularization

The type of MTL algorithm (cross-task regularizer). The value must be one of {L21, Lasso, Trace, Graph, CMTL }

Lam1

A positive constant λ_{1} to control the cross-task regularization

Lam1_seq

A positive sequence of Lam1. If the parameter is given, the model is trained using warm-start technique. Otherwise, the model is trained based on the Lam1 and the initial search point (opts$init).

Lam2

A non-negative constant λ_{2} to improve the generalization performance with the default value of 0 (except for Regularization=CMTL)

opts

Options of the optimization procedure. One can set the initial search point, the tolerance and the maximized number of iterations using this parameter. The default value is list(init=0, tol=10^-3, maxIter=1000)

G

A matrix to encode the network information. This parameter is only used in the MTL with graph structure (Regularization=Graph )

k

A positive number to modulate the structure of clusters with the default of 2. This parameter is only used in MTL with clustering structure (Regularization=CMTL ) Note, the larger number is adapted to more complex clustering structure.

Value

The trained model including the coefficient matrix W and intercepts C and related meta information

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#create the example data
data<-Create_simulated_data(Regularization="L21", type="Regression")
#train a MTL model
#cold-start
model<-MTL(data$X, data$Y, type="Regression", Regularization="L21",
    Lam1=0.1, Lam2=0, opts=list(init=0,  tol=10^-6, maxIter=1500))
#warm-start
model<-MTL(data$X, data$Y, type="Regression", Regularization="L21",
    Lam1=0.1, Lam1_seq=10^seq(1,-4, -1), Lam2=0, opts=list(init=0,  tol=10^-6, maxIter=1500))
#meta-information
str(model)
#plot the historical objective values
plotObj(model)

transbioZI/RMTL documentation built on May 5, 2019, 1:32 a.m.