An interactive web application for simulating and analyzing spatial point processes using Markov Chain Monte Carlo (MCMC) methods with Birth-Death-Migration algorithms.
![]() Simulated Configurations |
![]() Number of Points Statistics |
![]() MCMC Performance Metrics |
Implements several spatial point process densities (Poisson, Strauss, Saturated, Hardcore) and a Birth-Death-Move MCMC sampler. The interactive dashboard allows users to:
- Configure point process parameters
- Run MCMC simulations with customizable chain length and burn-in periods
- Visualize spatial configurations
- Analyze convergence properties through acceptance rates and autocorrelation functions
# Install uv if you haven't already
pip install uv
# Create a virtual environment
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install the project in editable (development) mode
uv pip install -e .# Create a virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install the project in editable (development) mode
pip install -e .streamlit run scripts/app.pyThe application will open in your default web browser at http://localhost:8501.
BirthDeathMigration: Main MCMC simulator classHistoryTracker: Simulation history loggingConfigEvaluator: Real-time metric computation
- Contains all implemented point process densities (e.g. Strauss, Poisson, Hardcore, Saturated Strauss)
- Each density is implemented as a class extending a common base interface
- Streamlit-based interactive dashboard
- Script for running and storing cProfile results of the BDM algorithm
- Helps identify performance bottlenecks and benchmark optimizations
- R (Interaction Radius): Distance threshold for point interactions (0.0 - 2.0)
- Note: Values > √2 ≈ 1.41 may have limited effect due to unit square geometry
- β (Intensity): Base intensity parameter controlling point density (1.0 - 500.0)
- γ (Interaction Strength): Repulsion strength between nearby points (0.0 - 1.0)
- γ = 0: Complete inhibition (hardcore process)
- γ = 1: No interaction (Poisson process)
- s (Saturation): Maximum number of neighbors contributing to interaction
All simulations are constrained to the unit square [0,1]² spatial domain.
- Iterations: Number of MCMC steps after burn-in
- Warm-up: Burn-in period to reach equilibrium
- Move Probabilities: Relative frequencies of birth/death/migration moves
- Implement the new density class in
src/densities/(create a new file if needed, or add to an existing one). - Add parameter controls in
app.py. - Update visualization methods as needed.
For questions, issues, or contributions, please open an issue on the project repository.


