get_data_params: Get parameters for building a model with known relationships

Description Usage Arguments Value See Also Examples

View source: R/get_data_params.R

Description

Read in vector of arguments, check their types and add them to a list params for building a model of input and response data with known relationships. If a parameter isn't in the given list the default is used.

Usage

1

Arguments

args

A character vector of arguments (character strings) of the form "<name>=<value>". Values will be converted to logical or numeric when necessary. Accepted <names> are below. Defaults in parenthesis:

decomp

Either 'CP' or 'Tucker'. (Tucker)

row.share

Logical. Should the variance be shared across rows of the projection matrices? This will cause predictors to be or excluded for the whole model, instead of just for particular latent factors. (T)

seed

Numeric. Seed used for random initialization. (NA)

scale

Logical. Should the input data columns should be scaled to have mean 0 and standard deviation 1. (TRUE)

m1.rows

Numeric. Number of rows (samples) for mode 1. (20)

m2.rows

Numeric. Number of rows (samples) for mode 2. (25)

m3.rows

Numeric. Number of rows (samples) for mode 3. (10)

m1.cols

Numeric. Number of columns (predictors) for mode 1. (100)

m2.cols

Numeric. Number of columns (predictors) for mode 2. (150)

m3.cols

Numeric. Number of columns (predictors) for mode 3. (0)

R

Numeric. If decomp=='CP' the dimension of the latent space for all modes. (4)

R1

Numeric. If decomp=='Tucker' the dimension of the core (latent space) for mode 1. (3)

R2

Numeric. If decomp=='Tucker' the dimension of the core (latent space) for mode 2. (3)

R3

Numeric. If decomp=='Tucker' the dimension of the core (latent space) for mode 3. (3)

A1.intercept

Logical. Should a column of 1s be added to the input data for mode 1. (TRUE)

A2.intercept

Logical. Should a column of 1s be added to the input data for mode 2. (TRUE)

A3.intercept

Logical. Should a column of 1s be added to the input data for mode 3. (TRUE)

H1.intercept

Logical. Should a column of 1s be added to the latent (H) matrix for mode 1. (TRUE)

H2.intercept

Logical. Should a column of 1s be added to the latent (H) matrix for mode 2. (TRUE)

H3.intercept

Logical. Should a column of 1s be added to the latent (H) matrix for mode 3. (TRUE)

m1.true

Numeric. Number of predictors for mode 1 (not counting the constant) contributing to the response. (15)

m2.true

Numeric. Number of predictors for mode 2 (not counting the constant) contributing to the response. (20)

m3.true

Numeric. Number of predictors for mode 3 (not counting the constant) contributing to the response. (0)

A1.const.prob

Numeric. Probability (0-1) of the constant term for mode 1 contributing to the response for mode 1. (1)

A2.const.prob

Numeric. Probability (0-1) of the constant term for mode 2 contributing to the response. (1)

A3.const.prob

Numeric. Probability (0-1) of the constant term for mode 3 contributing to the response. (1)

A.samp.sd

Numeric. Standard deviation for sampling values for the projection (A) matrices. (1)

H.samp.sd

Numeric. Standard deviation for sampling values for the latent (H) matrices. (1)

R.samp.sd

Numeric. Standard deviation for sampling values for the core tensor. (1)

true.0D

Numeric. 0 or 1, should a global intercept (0 dimensional intercept) be added to all responses? Only possible if H1.intercept==H2.intercept==H3.intercept==TRUE. core.spar is used if equal to NA. (NA)

true.1D.m[1-3]

Numeric. Number of interactions of 1 dimension in the core tensor (non-zero elements on the edges of the core tensor if H#.intercept==TRUE). core.spar is used if equal to NA. (NA)

true.2D.m[1-3]m[1-3]

Numeric. Number of interactions of 2 dimensions in the core tensor (non-zero elements of the faces of the core tensor if H#.intercept==TRUE). core.spar is used if equal to NA. (NA)

true.3D

Numeric. Number of interactions of 3 dimensions in the core tensor (non-zero elements internal to the core tensor). core.spar is used if equal to NA. (NA)

core.spar

Numeric. Fraction of core elements that are non-zero. (1)

noise.sd

Numeric. Relative standard deviation of noise added to response tensor. (0.1)

Value

list of parameters used by mk_toy function. Values in args that are not accepted parameters will be excluded and a warning displayed.

See Also

mk_toy

Examples

1
2
3
4
5
args <- c('decomp=Tucker', 'row.share=F',
          'A1.intercept=T', 'A2.intercept=T', 'A3.intercept=F',
          'H1.intercept=T', 'H2.intercept=T', 'H3.intercept=T',
          'R1=4', 'R2=4', 'R3=2')
data.params <- get_data_params(args)

nathanlazar/BaTFLED3D documentation built on May 23, 2019, 12:19 p.m.