Learn R Programming

BaTFLED3D (version 0.2.11)

mk_toy: Make a toy dataset to test the 3d BaTFLED model.

Description

Returns a toy model with the specified size, sparsity and noise generated either with a CP or Tucker factorization model. Values in predictor matrices (X1, X2, X3) are pulled from a standard normal distribuion. Dummy names are given to the predictors.

Usage

mk_toy(params)

Arguments

params

list of parameters created with get_data_params

Value

a list containing elements of the model

mode1.X

Input data for mode 1

mode2.X

Input data for mode 2

mode3.X

Input data for mode 3

mode1.A

Projection matrix for mode 1

mode2.A

Projection matrix for mode 2

mode3.A

Projection matrix for mode 3

mode1.H

Latent matrix for mode 1

mode2.H

Latent matrix for mode 2

mode3.H

Latent matrix for mode 3

core

Core tensor if params$decomp=='Tucker'

resp

Response tensor

Examples

Run this code
# NOT RUN {
data.params <- get_data_params(c('decomp=Tucker'))
toy <- mk_toy(data.params)

data.params <- get_data_params(c('decomp=CP'))
toy <- mk_toy(data.params)
# }

Run the code above in your browser using DataLab