{"id":13528574,"url":"https://github.com/uber/orbit","last_synced_at":"2025-04-09T03:10:30.780Z","repository":{"id":38611883,"uuid":"232388106","full_name":"uber/orbit","owner":"uber","description":"A Python package for Bayesian forecasting with object-oriented design and probabilistic models under the hood.","archived":false,"fork":false,"pushed_at":"2024-07-10T23:00:12.000Z","size":168273,"stargazers_count":1872,"open_issues_count":50,"forks_count":134,"subscribers_count":35,"default_branch":"dev","last_synced_at":"2024-10-29T15:18:45.198Z","etag":null,"topics":["arima","bayesian","bayesian-methods","bayesian-statistics","changepoint","exponential-smoothing","forecast","forecasting","machine-learning","orbit","probabilistic","probabilistic-programming","pyro","pystan","python","pytorch","regression","regression-models","stan","time-series"],"latest_commit_sha":null,"homepage":"https://orbit-ml.readthedocs.io/en/stable/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-07T18:20:37.000Z","updated_at":"2024-10-29T08:33:16.000Z","dependencies_parsed_at":"2024-01-18T16:00:34.293Z","dependency_job_id":"72a317f3-0436-4093-9e71-7b368bea1d22","html_url":"https://github.com/uber/orbit","commit_stats":{"total_commits":793,"total_committers":25,"mean_commits":31.72,"dds":0.617906683480454,"last_synced_commit":"08ee5655a1f95406ed845122108e004264431a36"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber%2Forbit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber%2Forbit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber%2Forbit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber%2Forbit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uber","download_url":"https://codeload.github.com/uber/orbit/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247968368,"owners_count":21025823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arima","bayesian","bayesian-methods","bayesian-statistics","changepoint","exponential-smoothing","forecast","forecasting","machine-learning","orbit","probabilistic","probabilistic-programming","pyro","pystan","python","pytorch","regression","regression-models","stan","time-series"],"created_at":"2024-08-01T07:00:21.394Z","updated_at":"2025-04-09T03:10:30.755Z","avatar_url":"https://github.com/uber.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n  \u0026emsp;\n  \u003ca href=\"https://join.slack.com/t/orbit-support/shared_invite/zt-1207qlxjl-fhiX_8vTu1Fsa1ao1vGFEA\"\u003eJoin\u0026nbsp;Slack\u003c/a\u003e\n  \u0026emsp; | \u0026emsp;\n  \u003ca href=\"https://orbit-ml.readthedocs.io/en/stable/\"\u003eDocumentation\u003c/a\u003e\n  \u0026emsp; | \u0026emsp;\n  \u003ca href=\"https://eng.uber.com/orbit/\"\u003eBlog - Intro\u003c/a\u003e\n  \u0026emsp; | \u0026emsp;\n  \u003ca href=\"https://eng.uber.com/the-new-version-of-orbit-v1-1-is-released/\"\u003eBlog - v1.1\u003c/a\u003e\n\u003c/p\u003e\n\n![Orbit banner](https://raw.githubusercontent.com/uber/orbit/dev/docs/img/orbit-banner.png)\n\n-------------------------------------------------------------------------------------------------------------------------------------\n\u003c!--- BADGES: START ---\u003e\n![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/uber/orbit)\n[![PyPI](https://img.shields.io/pypi/v/orbit-ml)][#pypi-package]\n[![Build and Test](https://github.com/uber/orbit/actions/workflows/test.yaml/badge.svg?branch=master)](https://github.com/uber/orbit/actions/workflows/test.yaml)\n[![Documentation Status](https://readthedocs.org/projects/orbit-ml/badge/?version=stable)](https://orbit-ml.readthedocs.io/en/latest/?badge=latest)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/orbit-ml)][#pypi-package]\n[![Downloads](https://pepy.tech/badge/orbit-ml)](https://pepy.tech/project/orbit-ml)\n[![Conda Recipe](https://img.shields.io/static/v1?logo=conda-forge\u0026style=flat\u0026color=green\u0026label=recipe\u0026message=orbit-ml)][#conda-forge-feedstock]\n[![Conda - Platform](https://img.shields.io/conda/pn/conda-forge/orbit-ml?logo=anaconda\u0026style=flat)][#conda-forge-package]\n[![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/orbit-ml?logo=anaconda\u0026style=flat\u0026color=orange)][#conda-forge-package]\n[![PyPI - License](https://img.shields.io/pypi/l/orbit-ml?logo=pypi\u0026style=flat\u0026color=green)][#github-license]\n\n[#github-license]: https://github.com/uber/orbit/blob/master/LICENSE\n[#pypi-package]: https://pypi.org/project/orbit-ml/\n[#conda-forge-package]: https://anaconda.org/conda-forge/orbit-ml\n[#conda-forge-feedstock]: https://github.com/conda-forge/orbit-ml-feedstock\n\u003c!--- BADGES: END ---\u003e\n\n\n# User Notice\n\nThe default page of the repo is on `dev` branch. To install the dev version, please check the section `Installing from Dev Branch`. If you are looking for a **stable version**, please refer to the `master` branch [here](https://github.com/uber/orbit/tree/master).\n\n\n# Disclaimer\n\nThis project\n\n- is stable and being incubated for long-term support. It may contain new experimental code, for which APIs are subject to change.\n- requires [cmdstanpy](https://mc-stan.org/cmdstanpy/) as one of the core dependencies for Bayesian sampling.\n\n# Orbit: A Python Package for Bayesian Forecasting\n\nOrbit is a Python package for Bayesian time series forecasting and inference. It provides a\nfamiliar and intuitive initialize-fit-predict interface for time series tasks, while utilizing probabilistic programming languages under the hood.\n\nFor details, check out our documentation and tutorials:\n- HTML (stable): https://orbit-ml.readthedocs.io/en/stable/\n- HTML (latest): https://orbit-ml.readthedocs.io/en/latest/\n\nCurrently, it supports concrete implementations for the following models:\n\n-  Exponential Smoothing (ETS)\n-  Local Global Trend (LGT)\n-  Damped Local Trend (DLT)\n-  Kernel Time-based Regression (KTR)\n\nIt also supports the following sampling/optimization methods for model estimation/inferences:\n\n-  Markov-Chain Monte Carlo (MCMC) as a full sampling method\n-  Maximum a Posteriori (MAP) as a point estimate method\n-  Variational Inference (VI) as a hybrid-sampling method on approximate\n   distribution\n\n\n##  Installation\n\n### Installing Stable Release\n\nInstall the library either from PyPi or from the source with `pip`. \nAlternatively, you can also install it from Anaconda with `conda`:\n\n**With pip**\n\n1. Installing from PyPI\n\n   ```sh\n   $ pip install orbit-ml\n   ```\n\n2. Install from source\n\n   ```sh\n   $ git clone https://github.com/uber/orbit.git\n   $ cd orbit\n   $ pip install -r requirements.txt\n   $ pip install .\n   ```\n\n**With conda**\n\nThe library can be installed from the conda-forge channel using conda.\n\n```sh\n$ conda install -c conda-forge orbit-ml\n```\n\n### Installing from Dev Branch\n\n```sh\n$ pip install git+https://github.com/uber/orbit.git@dev\n```\n\n## Quick Start with Damped-Local-Trend (DLT) Model\n\n### FULL Bayesian Prediction\n\n```python\nfrom orbit.utils.dataset import load_iclaims\nfrom orbit.models import DLT\nfrom orbit.diagnostics.plot import plot_predicted_data\n\n# log-transformed data\ndf = load_iclaims()\n# train-test split\ntest_size = 52\ntrain_df = df[:-test_size]\ntest_df = df[-test_size:]\n\ndlt = DLT(\n  response_col='claims', date_col='week',\n  regressor_col=['trend.unemploy', 'trend.filling', 'trend.job'],\n  seasonality=52,\n)\ndlt.fit(df=train_df)\n\n# outcomes data frame\npredicted_df = dlt.predict(df=test_df)\n\nplot_predicted_data(\n  training_actual_df=train_df, predicted_df=predicted_df,\n  date_col=dlt.date_col, actual_col=dlt.response_col,\n  test_actual_df=test_df\n)\n```\n\n![full-pred](docs/img/dlt-mcmc-pred.png)\n\n## Demo\n\nNowcasting with Regression in DLT:\n\n[![Open All Collab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/edwinnglabs/ts-playground/blob/master/Orbit_Tutorial.ipynb)\n\nBacktest on M3 Data:\n\n[![Open All Collab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/edwinnglabs/ts-playground/blob/master/orbit_m3_backtest.ipynb)\n\nMore examples can be found under [tutorials](./docs/tutorials)\nand [examples](./examples).\n\n# Contributing\n\nWe welcome community contributors to the project. Before you start, please read our\n[code of conduct](CODE_OF_CONDUCT.md) and check out\n[contributing guidelines](CONTRIBUTING.md) first.\n\n\n# Versioning\n\nWe document versions and changes in our [changelog](./docs/changelog.rst).\n\n\n# References\n\n## Presentations\n\nCheck out the ongoing [deck](https://docs.google.com/presentation/d/1WfTtXAW3rud4TX9HtB3NkE6buDE8tWk6BKZ2hRNXjCI/edit?usp=sharing) for scope and roadmap of the project. An older deck used in the [meet-up](https://www.meetup.com/UberEvents/events/279446143/) during July 2021 can also be found [here](https://docs.google.com/presentation/d/1R0Ol8xahIE6XlrAjAi0ewu4nRxo-wQn8w6U7z-uiOzI/edit?usp=sharing).\n\n\n## Citation\n\nTo cite Orbit in publications, refer to the following whitepaper:\n\n[Orbit: Probabilistic Forecast with Exponential Smoothing](https://arxiv.org/abs/2004.08492)\n\nBibtex:\n\n```\n@misc{\n    ng2020orbit,\n    title={Orbit: Probabilistic Forecast with Exponential Smoothing},\n    author={Edwin Ng,\n        Zhishi Wang,\n        Huigang Chen,\n        Steve Yang,\n        Slawek Smyl},\n    year={2020}, eprint={2004.08492}, archivePrefix={arXiv}, primaryClass={stat.CO}\n}\n```\n\n##  Papers\n\n- Bingham, E., Chen, J. P., Jankowiak, M., Obermeyer, F., Pradhan, N., Karaletsos, T., Singh, R., Szerlip,\n  P., Horsfall, P., and Goodman, N. D. Pyro: Deep universal probabilistic programming. The Journal of Machine Learning\n  Research, 20(1):973–978, 2019.\n- Hoffman, M.D. and Gelman, A. The No-U-Turn sampler: adaptively setting path lengths in Hamiltonian Monte Carlo.\n  J. Mach. Learn. Res., 15(1), pp.1593-1623, 2014.\n- Hyndman, R., Koehler, A. B., Ord, J. K., and Snyder, R. D. Forecasting with exponential smoothing:\n  the state space approach. Springer Science \u0026 Business Media, 2008.\n- Smyl, S. Zhang, Q. Fitting and Extending Exponential Smoothing Models with Stan.\n  International Symposium on Forecasting, 2015.\n\n## Related projects\n\n- [Pyro](https://github.com/pyro-ppl/pyro)\n- [Stan](https://github.com/stan-dev/stan)\n- [Rlgt](https://cran.r-project.org/web/packages/Rlgt/index.html)\n- [forecast](https://github.com/robjhyndman/forecast)\n- [prophet](https://facebook.github.io/prophet/)\n","funding_links":[],"categories":["Uncategorized","Libraries","Time Series","概率统计","Python","⏳ Time Series Analysis","Linear Algebra / Statistics Toolkit","📦 Packages"],"sub_categories":["Uncategorized","Tools","Statistical Toolkit","Python"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuber%2Forbit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuber%2Forbit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuber%2Forbit/lists"}