Simulates data for multi-task learning.
Usage
sim.data.multiple(
  prob.common = 0.05,
  prob.separate = 0.05,
  q = 3,
  n0 = 100,
  n1 = 10000,
  p = 200,
  rho = 0.5,
  family = "gaussian"
)Arguments
- prob.common
- probability of common effect (number between 0 and 1) 
- prob.separate
- probability of separate effect (number between 0 and 1) 
- q
- number of datasets: integer 
- n0
- number of training samples: integer vector of length \(q\) 
- n1
- number of testing samples for all datasets: integer 
- p
- number of features: integer 
- rho
- correlation (for decreasing structure) 
- family
- character - "gaussian"or- "binomial"
Value
Returns a list with slots
y_train (\(n_0 \times q\) matrix),
X_train(\(n_0 \times p\) matrix),
y_test (\(n_1 \times q\) matrix),
X_test (\(n_1 \times p\) matrix),
and beta (\(p \times q\) matrix).
Examples
data <- sim.data.multiple()
sapply(X=data,FUN=dim)
#>      y_train X_train y_test X_test beta
#> [1,]     100     100  10000  10000  200
#> [2,]       3     200      3    200    3