vbmfa {autoMFA} R Documentation

## Variational Bayesian Mixture of Factor Analyzers (VB-MoFA)

### Description

An implementation of the Variational Bayesian Mixutre of Factor Analysers (Ghahramani and Beal 2000). This code is an R port of the MATLAB code which was written by M.J.Beal and released alongside their paper.

### Usage

vbmfa(Y, qmax = NULL, maxtries = 3, verbose = FALSE, varimax = FALSE)


### Arguments

 Y An n by p (normalised) data matrix (i.e. the result of a call to the function preprocess), where n is the number of observations and p is the number of dimensions of the data. qmax Maximum factor dimensionality (default p-1). maxtries The maximum number of times the algorithm will attempt to split each component. verbose Whether or not verbose output should be printed during the model fitting process (defaults to false). varimax Boolean indicating whether the output factor loading matrices should be constrained using varimax rotation or not.

### Value

A list containing the following elements:

• model: A list specifying the final MFA model. This contains:

• B: A p by p by q array containing the factor loading matrices for each component.

• D: A p by p by g array of error variance matrices.

• mu: A p by g array containing the mean of each cluster.

• pivec: A 1 by g vector containing the mixing proportions for each FA in the mixture.

• numFactors: A 1 by g vector containing the number of factors for each FA.

• clustering: A list specifying the clustering produced by the final model. This contains:

• responsibilities: A n by g matrix containing the probability that each point belongs to each FA in the mixture.

• allocations: A n by 1 matrix containing which FA in the mixture each point is assigned to based on the responsibilities.

• diagnostics: A list containing various pieces of information related to the fitting process of the algorithm. This contains:

• bic: The BIC of the final model.

• logL: The log-likelihood of the final model.

• Fhist:The values of F at each iteration of the algorithm. F is defined in (Ghahramani and Beal 2000).

• times: The time taken for each loop in the algorithm.

• totalTime: The total time taken to fit the final model.

### References

Ghahramani Z, Beal MJ (2000). “Variational inference for Bayesian Mixtures of Factor Analysers.” In Advances in neural information processing systems, 449–455.

preprocess for centering and scaling data prior to using vbmfa.
RNGversion('4.0.3'); set.seed(3)