This repository provides a runnable example of Bayesian latent time series modeling for high dimensional data.
The workflow produces posterior diagnostics and a latent signal recovery figure saved to results/latent_recovery.png.
Many real world datasets are high dimensional, noisy, and evolve over time, while the true driving structure is latent. This project demonstrates a Bayesian approach for recovering interpretable temporal signals with uncertainty quantification.
- Latent time series modeled with a Gaussian random walk prior
- Dimension specific loadings with shrinkage priors
- Observation model with shared noise
- Bayesian inference via MCMC using PyMC
- Outputs include posterior diagnostics and latent recovery plots
src/: core modeling codenotebooks/: exploratory analysis and examplesscripts/: runnable analysis pipelinesdata/: simulated or small example datasetsresults/: figures and output summaries
python -m venv .venv source .venv/bin/activate # macOS or Linux
pip install -r requirements.txt python scripts/run_simulation.py
Running the script generates the following latent signal recovery plot with posterior uncertainty.
Create a virtual environment, install dependencies, and run the simulation script.
