Quickstart
This guide provides a quick introduction to the LoS Estimator using a synthetic dataset.
Installation
First, clone the repository and set up a virtual environment:
git clone git@git.rwth-aachen.de:jrc-combine/los-estimator.git
cd los-estimator
python -m venv .venv
# On Windows
.\.venv\Scripts\activate
# On Linux/macOS
source .venv/bin/activate
pip install -r requirements.txt
Synthetic Example
The package includes a demonstration script that generates synthetic ICU data and performs LoS estimation:
python examples/synthetic_example.py
This script demonstrates the complete workflow:
Generates synthetic ICU admission time series
Simulates occupancy data using a known lognormal LoS distribution
Estimates the LoS distribution from the simulated data
Compares estimated distributions against the ground truth
Generates visualizations and animations
The configuration is read from examples/synthetic_example.toml. You can modify parameters in this file or the script to experiment with different settings.
Understanding the Results
Results are saved to examples/results/ with the following structure:
- Run Metadata
run.log- Complete execution logrun_configurations.toml- Configuration snapshot for reproducibility
- Performance Metrics
metrics/- CSV files and plots showing model performance across windows
- Visualizations
figures/- Static plots of fitting results, errors, and comparisons
- Animations
animation/- Frame-by-frame visualizations showing model evolutionanimation/combined_video.gif- Animated overview of the fitting process
- Model Data
model_data/- Fitted parameters per window (CSV format)model_data/*.pkl- Serialized Python objects for later analysis
For detailed output documentation, see Output Format.
Next Steps
Try the Estimation Run example with actual ICU data
Review Command-Line Interface for command-line options
Explore Input Format to understand data requirements
Check the API for programmatic usage