This repository contains R scripts for parameter generation, model loading, calibration, prediction, and analysis for epidemic simulation studies.
Whether you want to run simulations 🧮, calibrate predictions 🔍, or visualize epidemic curves 📈 — this project has you covered.
📝 Generates the simulation parameters used throughout the analysis.
🤖 Loads the pre-trained BiLSTM model for epidemic curve prediction.
🎯 Applies Approximate Bayesian Computation (ABC) for calibration.
🔗 Combines ABC calibration with BiLSTM predictions and saves the results.
📈 Generates epidemic curves from the predicted parameters.
📊 Analyzes predicted parameters to find bias and create boxplots.
📁 Contains the pre-trained BiLSTM model used for machine learning–based calibration.
These models are loaded by 01a-bilstm.R
and used to improve prediction accuracy.
📁 Contains PyTorch code for reading and processing epidemic simulation results:
- Loads
incidence.csv
📄 (epidemic incidence data) - Loads
theta.csv
📄 (model parameter values) - Trains and evaluates a PyTorch-based deep learning model for epidemic forecasting.
- R version: Ensure you’re using a compatible R version 📦 with all required packages installed.
- Execution order: Run scripts in the order listed above for consistent results.
- Outputs: Predictions, epidemic curves, and statistical plots are saved in the designated output folders.
1️⃣ Generate parameters
Rscript 00-params.R
2️⃣ Load model & run calibration
Rscript 01a-bilstm.R
Rscript 01b-abc.R
3️⃣ Combine calibration & predictions
Rscript 02-abc-bilstm-prediction.R
4️⃣ Generate epicurves
Rscript 03-epicurves-stats.R
5️⃣ Analyze parameter statistics
Rscript 04-parameter-stats.R