Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev gam pyro rebase #298

Merged
merged 24 commits into from
Nov 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ jobs:
# environment variable in Travis see below.
- fossa init
- fossa analyze
- stage: deploy
script: skip
deploy:
provider: pypi
edge: true
username: "__token__"
password: $PYPI_API_TOKEN
on:
tags: true
skip_existing: true
distributions: "sdist bdist_wheel"

after_success:
- cd orbit && fossa test
- fossa test
35 changes: 28 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
.. image:: docs/img/orbit-icon-small.png
.. image:: docs/img/orbit-banner.png

-------------------------------------------

**Disclaimer: Orbit 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.**
|pypi| |travis| |downloads|

Orbit is a Python package for time series modeling and inference
using Bayesian sampling methods for model estimation. It provides a
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 models
====================

Orbit is a Python package for Bayesian forecasting models developed under object-oriented design. It provides a
familiar and intuitive initialize-fit-predict interface for working with
time series tasks, while utilizing probabilistic modeling under
time series tasks, while utilizing probabilistic modeling api under
the hood.

The initial release supports concrete implementation for the following
Expand Down Expand Up @@ -134,3 +142,16 @@ 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>`__


.. |pypi| image:: https://badge.fury.io/py/orbit-ml.svg
:target: https://badge.fury.io/py/orbit-ml
:alt: pypi

.. |travis| image:: https://travis-ci.com/uber/orbit.svg?branch=master
:target: https://travis-ci.com/uber/orbit
:alt: travis

.. |downloads| image:: https://static.pepy.tech/personalized-badge/orbit-ml?period=month&units=international_system&left_color=blue&right_color=grey&left_text=Downloads
:target: https://pepy.tech/project/orbit-ml
:alt: downloads
29 changes: 29 additions & 0 deletions docs/_static/css/orbit.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@import url("theme.css");

.wy-side-nav-search {
background-color: #276EF1;
}

.wy-side-nav-search a {
margin: 0
}

.wy-side-nav-search > div.version {
color: #ffffff;
}

.wy-nav-top {
background: #949CE3;
}

.wy-menu-vertical li.on a, .wy-menu-vertical li.current>a {
background: #c4cfd4;
}

.wy-side-nav-search input[type=text] {
border-color: #313131;
}

.wy-side-nav-search>a img.logo, .wy-side-nav-search .wy-dropdown>a img.logo {
max-width: 40%;
}
19 changes: 19 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import os
import sys
import sphinx_rtd_theme
sys.path.insert(0, os.path.abspath('..'))
import matplotlib
import orbit
Expand All @@ -38,6 +39,7 @@
# 'sphinx.ext.autosummary',
# 'sphinx.ext.doctest',
'sphinx.ext.mathjax',
'sphinx.ext.githubpages',
# 'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'nbsphinx',
Expand All @@ -62,6 +64,7 @@
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

html_context = {
'display_github': True,
Expand All @@ -70,10 +73,26 @@
'github_version': 'master/docs/',
}

# logo
html_logo = 'img/orbit-logo-black.png'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
html_theme_options = {
# 'logo_only': False,
'navigation_depth': 3,
}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_style = 'css/orbit.css'


html_favicon = 'img/favicon/favicon.ico'

napoleon_numpy_docstring = True
napoleon_include_init_with_doc = True
Expand Down
Binary file added docs/img/favicon/favicon.ico
Binary file not shown.
Binary file added docs/img/orbit-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/orbit-icon-raw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/img/orbit-icon-small.png
Binary file not shown.
Binary file removed docs/img/orbit-icon.png
Binary file not shown.
Binary file added docs/img/orbit-logo-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/orbit-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion docs/tutorials/decompose_prediction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import pandas as pd\n",
"import numpy as np\n",
"from orbit.models.dlt import DLTMAP, DLTFull\n",
Expand Down Expand Up @@ -197,7 +198,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.6.8"
},
"toc": {
"base_numbering": 1,
Expand Down
3 changes: 2 additions & 1 deletion docs/tutorials/dlt.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import pandas as pd\n",
"import numpy as np\n",
"from orbit.models.dlt import DLTMAP, DLTFull, DLTAggregated\n",
Expand Down Expand Up @@ -625,7 +626,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.6.8"
},
"toc": {
"base_numbering": 1,
Expand Down
11 changes: 6 additions & 5 deletions docs/tutorials/lgt.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import pandas as pd\n",
"import numpy as np\n",
"from orbit.models.lgt import LGTMAP, LGTAggregated, LGTFull\n",
Expand Down Expand Up @@ -162,8 +163,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 227 ms, sys: 14 ms, total: 241 ms\n",
"Wall time: 527 ms\n"
"CPU times: user 223 ms, sys: 9.22 ms, total: 232 ms\n",
"Wall time: 317 ms\n"
]
}
],
Expand Down Expand Up @@ -265,8 +266,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 74.3 ms, sys: 64.2 ms, total: 138 ms\n",
"Wall time: 8.14 s\n"
"CPU times: user 70.2 ms, sys: 67 ms, total: 137 ms\n",
"Wall time: 8.44 s\n"
]
}
],
Expand Down Expand Up @@ -320,7 +321,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.6.8"
},
"toc": {
"base_numbering": 1,
Expand Down
3 changes: 2 additions & 1 deletion docs/tutorials/pyro_basic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import pandas as pd\n",
"import numpy as np\n",
"from orbit.models.lgt import LGTMAP, LGTAggregated, LGTFull\n",
Expand Down Expand Up @@ -303,7 +304,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.6.8"
},
"toc": {
"base_numbering": 1,
Expand Down
3 changes: 2 additions & 1 deletion docs/tutorials/quick_start.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import pandas as pd\n",
"import numpy as np\n",
"import warnings\n",
Expand Down Expand Up @@ -210,7 +211,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.6.8"
},
"toc": {
"base_numbering": 1,
Expand Down
8 changes: 4 additions & 4 deletions examples/DLT_Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
}
],
"source": [
"plot_predicted_data(training_actual_df=df, predicted_df=predicted_df, \n",
"_ = plot_predicted_data(training_actual_df=df, predicted_df=predicted_df, \n",
" date_col=dlt.date_col, actual_col=dlt.response_col)"
]
},
Expand Down Expand Up @@ -298,7 +298,7 @@
}
],
"source": [
"plot_predicted_data(training_actual_df=df, predicted_df=predicted_df_dlt_log, \n",
"_ = plot_predicted_data(training_actual_df=df, predicted_df=predicted_df_dlt_log, \n",
" date_col=dlt_log.date_col, actual_col=dlt_log.response_col)"
]
},
Expand Down Expand Up @@ -386,7 +386,7 @@
}
],
"source": [
"plot_predicted_data(training_actual_df=df, predicted_df=predicted_df_dlt_logit, \n",
"_ = plot_predicted_data(training_actual_df=df, predicted_df=predicted_df_dlt_logit, \n",
" date_col=dlt_log.date_col, actual_col=dlt_log.response_col)"
]
},
Expand Down Expand Up @@ -467,7 +467,7 @@
}
],
"source": [
"plot_predicted_data(training_actual_df=df, predicted_df=predicted_df_dlt_logit, \n",
"_ = plot_predicted_data(training_actual_df=df, predicted_df=predicted_df_dlt_logit, \n",
" date_col=dlt_log.date_col, actual_col=dlt_log.response_col)"
]
}
Expand Down
2 changes: 1 addition & 1 deletion examples/Daily_Forecast_Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
}
],
"source": [
"plot_predicted_data(training_actual_df=df[-90:], predicted_df=predicted_df[-90:], \n",
"_ = plot_predicted_data(training_actual_df=df[-90:], predicted_df=predicted_df[-90:], \n",
" test_actual_df=test_df, date_col=dlt.date_col,\n",
" actual_col='sales')"
]
Expand Down
6 changes: 3 additions & 3 deletions examples/LGT_Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@
}
],
"source": [
"plot_predicted_data(training_actual_df=train_df, predicted_df=predicted_df, \n",
"_ = plot_predicted_data(training_actual_df=train_df, predicted_df=predicted_df, \n",
" date_col=date_col, actual_col=response_col, \n",
" test_actual_df=test_df)"
]
Expand Down Expand Up @@ -610,7 +610,7 @@
}
],
"source": [
"plot_predicted_data(training_actual_df=train_df, predicted_df=predicted_df, \n",
"_ = plot_predicted_data(training_actual_df=train_df, predicted_df=predicted_df, \n",
" date_col=lgt.date_col, actual_col=lgt.response_col, \n",
" test_actual_df=test_df)"
]
Expand Down Expand Up @@ -884,7 +884,7 @@
}
],
"source": [
"plot_predicted_components(predicted_df=predicted_df, date_col=date_col)"
"_ = plot_predicted_components(predicted_df=predicted_df, date_col=date_col)"
]
}
],
Expand Down
10 changes: 5 additions & 5 deletions examples/LGT_Pyro_Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
],
"source": [
"predicted_df = lgt_map.predict(df=test_df)\n",
"plot_predicted_data(training_actual_df=train_df, predicted_df=predicted_df, \n",
"_ = plot_predicted_data(training_actual_df=train_df, predicted_df=predicted_df, \n",
" date_col=lgt_map.date_col, actual_col=lgt_map.response_col, \n",
" test_actual_df=test_df)"
]
Expand Down Expand Up @@ -314,17 +314,17 @@
}
],
"source": [
"plot_predicted_data(training_actual_df=train_df, predicted_df=predicted_df, \n",
"_ = plot_predicted_data(training_actual_df=train_df, predicted_df=predicted_df, \n",
" date_col=lgt_vi.date_col, actual_col=lgt_vi.response_col, \n",
" test_actual_df=test_df)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "orbit",
"display_name": "Python 3",
"language": "python",
"name": "orbit"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -336,7 +336,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.7.7"
},
"toc": {
"base_numbering": 1,
Expand Down
2 changes: 1 addition & 1 deletion orbit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name = 'orbit'
__version__ = '1.0.5'
__version__ = '1.0.10'

Loading