Create_simulated_data: Create an example dataset for testing the MTL algorithm

View source: R/Create_simulated_data.R

Create_simulated_dataR Documentation

Create an example dataset for testing the MTL algorithm

Description

Create an example dataset which contains 1), training datasets (X: feature matrices, Y: response vectors); 2), test datasets (tX: feature matrices, tY: response vectors); 3), the ground truth model (W: coefficient matrix) and 4), extra information for some algorithms (i.e. a matrix for encoding the network information is necessary for calling the MTL method with network structure(Regularization=Graph )

Usage

Create_simulated_data(
  t = 5,
  p = 50,
  n = 20,
  type = "Regression",
  Regularization = "L21"
)

Arguments

t

Number of tasks

p

Number of features

n

Number of samples of each task. For simplicity, all tasks contain the same number of samples.

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 }

Value

The example dataset.

Examples

data<-Create_simulated_data(t=5,p=50, n=20, type="Regression", Regularization="L21")
str(data)

RMTL documentation built on May 2, 2022, 5:06 p.m.