Skip to content
Anders Reenberg Andersen edited this page Dec 25, 2025 · 2 revisions


PhaseDist (phasedist) is a Python package for fitting continuous and discrete phase-type (PH) distributions. This wiki includes the documentation of PhaseDist, including installation instructions and requirements.

Overview

  • Fit discrete and continuous phase-type distributions using the Expectation-Maximization (EM) algorithms described in Bladt and Nielsen, p. 675 and 678 (2017).
  • Use built-in methods to compare the fitted PH distribution to the observed data.
  • Evaluate metrics of the fitted PH distribution, such as the mean, density, quantile function, and more.
  • Simulate observations from a PH distribution.
  • Approximate non-PH distributions (with continuous density) using a continuous PH distibution and the EM algorithm described in Bladt and Nielsen, p. 681 (2017).

How to install

Install from PyPI with:

pip install phasedist

Dependencies

PhaseDist depends on the following packages which will be automatically installed upon installation of PhaseDist using pip.

  • NumPy (>= 1.24.2)
  • SciPy (>= 1.10.1)
  • MatPlotLib (>= 3.7.2)
  • StatsModels (>= 0.14.4)

Requirements

  • Operating system: OS independent.
  • PhaseDist has been tested on Ubuntu 22.04.5 LTS.

References

Bladt, M., & Nielsen, B. F. (2017). Matrix-Exponential Distributions in Applied Probability. Springer. https://doi.org/10.1007/978-1-4939-7049-0

Clone this wiki locally