fuse_data {sparselink}R Documentation

Data fusion

Description

Data fusion

Usage

fuse_data(x, y = NULL, foldid = NULL)

Arguments

x

list of q matrices, with n_1,\ldots,n_q rows and with p columns

y

list of q vectors, of length n_1,\ldots,n_q, or NULL (default)

foldid

list of q vectors, of length n_1,\ldots,n_q, or NULL (default)

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)
sapply(X=data$X_train,FUN=dim)
fuse <- fuse_data(x=data$X_train,y=data$y_train)
length(fuse$y)
dim(fuse$x)
table(fuse$index)


[Package sparselink version 1.0.0 Index]