Clustering, density estimation, and anomaly detection · Mixture and density models · UCL040 · Model
Student-t mixture model
Replace Gaussian components with heavy-tailed Student-t distributions to reduce the influence of observations far from their assigned cluster.
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
Replace Gaussian components with heavy-tailed Student-t distributions to reduce the influence of observations far from their assigned cluster. Useful for continuous populations with tails broader than Gaussian components can explain.
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 finite mixture of Gaussian scale-mixture components with latent observation weights.
Assumptions
Heavy tails help with moderate outliers but can absorb meaningful small groups. For low degrees of freedom, moments may not exist; the scale matrix is not always the covariance.
Formula / computational definition
, where is feature dimension and degrees of freedom. In the latent scale representation, an EM-style update gives weight , with squared Mahalanobis distance . Large residuals receive smaller effective weight.
Parameters and notation
Learned or fitted quantities: Weights, locations, scale matrices, degrees of freedom, and responsibilities. User-set hyperparameters/design choices: Choose component count, shared or component-specific degrees of freedom, covariance restrictions, and numerical bounds. 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
Inspect fitted tail parameters, held-out log density, assignment stability, and sensitivity to extreme observations. Compare with Gaussian mixtures at comparable complexity.
Example application
Cluster heavy-tailed measurement populations without allowing a few extremes to dominate. 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 teigen supplies Student-t mixture clustering with structured covariance models. Python needs a custom EM implementation or bridge to R; SciPy's t density alone does not fit a mixture. The component code illustrates the residual-dependent latent weight.
Component: Student-t mixture latent residual weights. 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 — Student-t mixture latent residual weights. · needs numpy
import numpy as np
delta=np.array([.2,2.,20.]); nu=4.; dimension=2
result=(nu+dimension)/(nu+delta)
print(result)
Component demo, not a trained model — Student-t mixture latent residual weights.
delta=c(.2,2,20); nu=4; dimension=2; result=(nu+dimension)/(nu+delta)
print(result)
Sources
- Source 1cran.r-project.org
From the CodeSplash reference, entry UCL040.