Clustering, density estimation, and anomaly detection · Mixture and density models · UCL041 · Model
Mixtures of factor analyzers
Model clusters with low-dimensional local linear covariance structure, reducing parameter count relative to unrestricted Gaussian mixtures in high-dimensional data.
In CodeSplash
A CodeSplash method runs this entry in Python and R. Set it up from the method's page.
- Gaussian mixture model Verified in Python and R
Do it in CodeSplash Run it on your own data, in Python or R.
- Availability
- Runs in CodeSplash
- Code example
- Component demo, not a trained model
- Who ran it
- CodeSplash's run and the reference's record
- CodeSplash's run
- Verified in Python and R through discover.gmm. The reference's example ran in Python and R here, and they agree.
- The reference's record
- Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.
Purpose
Model clusters with low-dimensional local linear covariance structure, reducing parameter count relative to unrestricted Gaussian mixtures in high-dimensional data.
Question / hypotheses
Which probability model adequately explains the reference distribution and its latent heterogeneity? This entry defines an estimation or optimization objective, not an intrinsic null/alternative hypothesis test.
Architecture / computational structure
A mixture of linear latent-factor components with diagonal residual noise.
Assumptions
Learned parameters include loadings, means, noise variances, and mixture weights. Loading rotations are nonidentifiable without additional conventions; stable density estimates do not imply uniquely interpretable factors. Each component remains locally Gaussian and linear.
Formula / computational definition
Within component , , with latent and noise , usually diagonal. Therefore . Mixture weights combine these local factor distributions.
Parameters and notation
Learned or fitted quantities: Weights, means, loading matrices, noise variances, and latent responsibilities. User-set hyperparameters/design choices: Choose component count , latent dimension , covariance constraints, and regularization. Tune these against the stated objective and stability/validation criteria; do not select settings on the final evaluation set.
Fitting, fine-tuning, and adaptation
Refit likelihood or posterior parameters on the new reference population; neural fine-tuning does not apply to this classical model. Warm starts can reduce computation but should be compared with fresh initialization. Recheck predictive fit and regularization after a domain shift.
How to use and calibrate
Compare held-out likelihood and penalized criteria, inspect residual covariance, and assess sensitivity to . Ensure every component has enough effective observations to estimate its local structure.
Example application
Model high-dimensional clusters with different local covariance directions. Define the reference population, measurement units, and success criterion before fitting; investigate whether discovered groups or alerts reflect the intended phenomenon.
Interpretation / pitfalls
Watch out
The reported result is conditional on the representation and objective. A stable partition can reflect nuisance structure such as batch, collection site, or missingness. Confirm the interpretation in original variables and an independent sample.
Python and R code examples
R pgmm implements parsimonious Gaussian mixtures based on factor-analyzer structures. Python can use a custom EM routine or bridge to R. Fitting global PCA followed by a GMM is a useful alternative but is not the same model because local loadings differ by component.
Component: Factor-analyzer component covariance. Python: executed successfully; R: not executed (Rscript unavailable). These small fixtures establish the arithmetic operation, not full-method accuracy or reproduction of paper results.
Python and R
The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.
Component demo, not a trained model — Factor-analyzer component covariance. · needs numpy
import numpy as np
loadings=np.array([[1.],[.5],[.2]]); psi=np.array([.2,.3,.4])
result=loadings@loadings.T+np.diag(psi)
print(result)
Component demo, not a trained model — Factor-analyzer component covariance.
loadings=matrix(c(1,.5,.2),3,1); psi=c(.2,.3,.4)
result=loadings%*%t(loadings)+diag(psi)
print(result)
Sources
- Source 1cran.r-project.org
From the CodeSplash reference, entry UCL041.