Open-source Python package

Forecasting
between 0 and 1.

Murphet is a Bayesian time-series model for rates and proportions. Forecast churn, conversion and occupancy with Python and Stan.

pip install murphet
Observed series

Hong Kong hotel occupancy

80%Jan 2025
Monthly hotel occupancy from February 2020 through January 2025. Use the arrow keys to explore.02550751002020202220242025
Author
Stephen Murphy
Release
v1.6.6
Model engine
Stan
License
MIT

The model

Making Prophet a Beta.

A full hotel has 100% occupancy. An empty one has 0%. Choose a likelihood that respects what your observations mean.

Bounded predictions

A Beta likelihood and a logit link keep the expected rate between zero and one.

Seasonal patterns

Fourier terms capture cycles such as a summer travel peak or a weekly signup rhythm.

Persistent deviations

An autoregressive term carries information from one observation to the next.

Work with Murphet