prophet/python
Ben Sully 0616bfb5da
Add model_to_dict and model_from_dict functions (#1871)
This commit adds the model_to_dict and model_from_dict functions, using
all of the logic that previously lived in model_to_json and
model_from_json, and converting those functions to simply reuse the new
ones.

This is useful because sometimes the user may want to serialize the dict
in some other way (e.g. another JSON serialization library such as ujson
or orjson, or something entirely different).
2021-04-20 18:10:06 -07:00
..
prophet Add model_to_dict and model_from_dict functions (#1871) 2021-04-20 18:10:06 -07:00
scripts Pakage rename (#1844) 2021-03-21 14:13:50 -07:00
stan add implementation for constant trend in Python (#1466) 2020-05-14 21:40:40 -07:00
LICENSE Change to MIT license 2019-05-21 11:40:04 -07:00
MANIFEST.in Pakage rename (#1844) 2021-03-21 14:13:50 -07:00
README.md Pakage rename (#1844) 2021-03-21 14:13:50 -07:00
requirements.txt Pin to last 2.* Pystan release. 2021-03-25 22:15:10 -07:00
setup.py Bump version numbers 2021-03-26 15:36:07 -07:00

Prophet: Automatic Forecasting Procedure

Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. It works best with time series that have strong seasonal effects and several seasons of historical data. Prophet is robust to missing data and shifts in the trend, and typically handles outliers well.

Prophet is open source software released by Facebook's Core Data Science team .

Full documentation and examples available at the homepage: https://facebook.github.io/prophet/

Other forecasting packages

Installation

pip install prophet

Note: Installation requires PyStan, which has its own installation instructions. On Windows, PyStan requires a compiler so you'll need to follow the instructions. The key step is installing a recent C++ compiler

Installation using Docker and docker-compose (via Makefile)

Simply type make build and if everything is fine you should be able to make shell or alternative jump directly to make py-shell.

To run the tests, inside the container cd python/prophet and then python -m unittest

Example usage

  >>> from prophet import Prophet
  >>> m = Prophet()
  >>> m.fit(df)  # df is a pandas.DataFrame with 'y' and 'ds' columns
  >>> future = m.make_future_dataframe(periods=365)
  >>> m.predict(future)