vbpca_control: Auxiliary for Controlling 'bayespca' estimation

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/vbpca_control.R

Description

Auxiliary control parameters for estimation of vbpca models. Internally used by vbpca, the function can be used for specifying specific parameter values.

Usage

1
2
3
4
vbpca_control(nstart = 1, center = TRUE, scalecorrection = 0, svdStart = TRUE,
     normalise = FALSE, seed = -1, plot.lowerbound = TRUE, hpdi = FALSE, probHPDI = 0.9,
     scaleprior = FALSE, alphatau = 0.5, betatau = 0.5, gammatau = -1, deltatau = 1,
     hypertype = 'common', beta1pi = 0.5, beta2pi = 0.5, v0 = 1e-04)

Arguments

nstart

integer;
number of (sequential) estimation of the vbpca algorithm.

center

bool;
boolean indicating whether to center the variables of the input data before model estimation.

scalecorrection

integer;
factor used for the scaling of the variables prior to the estimation step. When smaller than 0, no scaling will be performed.

svdStart

bool;
boolean indicating whether the values of the SVD decomposition of the input matrix shoul be used as starting values.

normalise

bool;
logical argument indicating whether the elements of the weight matrix W should be normalised (after the estimation of the model).

seed

integer;
seed used for the random initialization of the model.

plot.lowerbound

bool;
boolean indicating whether the function should plot the traceplot of the ELBO values calculated across the Variational Bayes iterations.

hpdi

bool;
boolean denoting whether the high posterior density intervals of W should be computed.

probHPDI

float;
the desired probability level of the HPD intervals.

scaleprior

bool;
logical; when TRUE, the prior variances tau will be scaled by the residual variance sigma2.

alphatau

float or array_like;
shape parameter for the Inverse Gamma hyperpriors. It can be scalar, or D dimensional.

betatau

float or array_like;
scale parameter for the Inverse Gamma hyperprior. It can be scalar, or D dimensional.

gammatau

float or array_like;
shape parameter for the Gamma hyperprior on betatau. It can be scalar, or D dimensional. In order for the Gamma hyperprior to be activated, all elements of gammatau must be larger than 0.

deltatau

float or array_like;
scale parameter for the Gamma hyperprior on betatau. It can be scalar, or D dimensional.

hypertype

character;
string denoting the type of update for the hyperparameters of the Gamma prior on betatau. Use 'global' for sharing information among all components; use 'component' for component-specific updates; use 'local' for element-specific updates.

beta1pi

float or array_like;
shape parameter which models the probability of inclusion in the Beta hyperprior (SVS = TRUE). It can be a scalar, or a D dimensional vector. When at least one element of beta1pi is smaller than 0, no updates will be performed on priorInclusion. When all elements are equal to 0, or all elements are positive and at least one is equal to 0, type-II ML updates will occur. When all the elements are larger than 0, a Beta hyperprior is assumed on priorInclusion.

beta2pi

float or array_like;
shape parameter which models the probability of exclusion in the Beta hyperprior (SVS = TRUE). It can be a scalar, or a D dimensional vector.

v0

float;
scalar value between 0 and 1 (possibly close to 0) which specifies how much the prior variance of the 'slab' variance tau should be scaled for the 'spike' component of the prior.

Details

Use seed > 0 to let vbpca internally use the specified seed. If seed < 0, the seed set in the global environment will be utilized.
scaleprior can be set to true when the prior variance tau should be scaled by the residual variance sigma2.
alphatau, betatau, gammatau, and deltatau can be either scalar (float) values, or D dimensional arrays, where D is the number of components specified in vbpca. In the first case, all components will share the same hyperparameters. In the second case, each hyperparameter will be component-specific. For the hyperparameters gammatau and deltatau, this type of setting can also be selected with the hypertype argument. Note that the (Gamma) priors on tau will be activated only when all elements of gammatau are larger than 0.
Similarly, beta1pi and beta2pi specify the Beta prior hyperparameters for the priorInclusion argument when SVS = TRUE. Both beta1pi and beta2pi can be scalar or D dimensional arrays. The Beta hyperpriors will be activated only when all elements of beta1pi are larger than 0.

Value

a list containing the control parameters specified by the user, as well as the unspecified default values.

Author(s)

D. Vidotto <d.vidotto@uvt.nl>

See Also

vbpca

Examples

1
2
3
# Specify controls for Inverse Gamma(1, .01) prior for W;
# and Beta(5, 1) prior for priorInclusion
ctrl <- vbpca_control(alphatau = 1, betatau = .01, beta1pi = 5, beta2pi = 1)

davidevdt/bayespca documentation built on Dec. 5, 2020, 3:28 a.m.