Data fusion
Value
Returns a list with the concatenated feature matrices in slot x
(\((\sum_i^q n_i) \times p\) matrix), the concatenated target vectors in slot y
(vector of length \((\sum_i^q n_i)\)), and the indices of the problems in slot index
(vector of length \((\sum_i^q n_i)\) with entries \(1,\ldots,q\)).
Examples
data <- sim_data_trans()
sapply(X=data$y_train,FUN=length)
#> [1] 50 100 200
sapply(X=data$X_train,FUN=dim)
#> [,1] [,2] [,3]
#> [1,] 50 100 200
#> [2,] 200 200 200
fuse <- fuse_data(x=data$X_train,y=data$y_train)
length(fuse$y)
#> [1] 350
dim(fuse$x)
#> [1] 350 200
table(fuse$index)
#>
#> 1 2 3
#> 50 100 200