Generates simple test data following the TCA model.
test_data(n, m, k, p1, p2, tau, log_file = "TCA.log")
The number of observations to simulate.
The number of features to simulate.
The number of sources to simulate.
The number of covariates that affect the source-specific values to simulate.
The number of covariates that affect the mixture values to simulate.
The variance of the i.i.d. component of variation to add on top of the simulated mixture values.
A path to an output log file. Note that if the file log_file
already exists then logs will be appended to the end of the file. Set log_file
to NULL
to prevent output from being saved into a file.
A list with the simulated data and parameters.
An m
by n
matrix of simulated data with m
features for n
observations.
A list with the simulated source-specific values, where the first element in the list is an m
by n
matrix (features by observations) corresponding to the values coming from the first source, the second element in the list is another m
by n
matrix (features by observations) corresponding to the values coming from the second source and so on.
An n
by k
matrix of simulated weights - the weights of the k
sources for each of the n
mixtures (observations).
An m
by k
matrix of the mean of each of the m
features for each of the k
sources.
An m
by k
matrix of the standard variation of each of the m
features for each of the k
sources.
An n
by p1
design matrix of simulated covariates that affect the hidden source-specific values.
An n
by p2
design matrix of simulated covariates that affect the mixture.
An m
by k*p1
matrix of the effects of the p1
factors in C1
on each of the m
features in X
, where the first p1
columns are the source-specific effects of the p1
factors on the first source, the following p1
columns are the source-specific effects on the second source and so on.
An m
by p2
matrix of the effects of the p2
factors in C2
on the mixture values of each of the m
features in X
.
See tca for details about the TCA model.
# NOT RUN {
data <- test_data(100, 50, 3, 2, 2, 0.01)
# }
Run the code above in your browser using DataLab