Written by Emtiyaz, CS, UBC.
Last updated: Dec. 03, 2010.
Description: This matlab code fits a factor analysis model for mixed
continuous and discrete dataset using an expectationmaximization (EM) algorithm.
The method is based on variational bounds
described in our NIPS 2010 paper.
This code can be used for latentfactor inference, parameter learning, and missingvalue imputation.
This implementation handles missingvalues in data.
Download: 2010NIPSFAcode.zip
System requirements and dependencies: The code works fine on
MATLAB 7.4 (2007a) and higher versions. We use some functions from Tom Minka’s
lightspeed toolbox for matrixinversion
and matrixdeterminant (included in the zip file), but can be replaced by other equivalent functions.
How to use the code:
Download and unzip the code. Inside MATLAB, execute the following commands:
> cd 2010NIPSFAcode;
> addpath(genpath(pwd));
> demoFA;
See demoFA.m for usage of various functions.
Description of files:
 demoFA.m runs the demo on Autompg dataset.
 initMixedDataFA.m initializes the parameters.
 inferMixedDataFA.m is the inference file
(use inferMixedDataFA_missing.m if data contains missing values).
 maxParamsMixedDataFA.m is the parametermaximization file.
 learnEM.m runs EM algorithm given the above three functions.
 Directory FA contains the corresponding files for
continuous data FA, although mixedDataFA code handles only continuous
(and only discrete) case as well.
Example: The example file ’demoFA’ runs the mixedDataFA code on
Autompg
data.
