https://github.com/heidelbergcement/hcrystalball

A library that unifies the API for most commonly used libraries and modeling techniques for time-series forecasting in the Python ecosystem.

https://github.com/heidelbergcement/hcrystalball

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.9%) to scientific vocabulary

Keywords

cross-validation data-science fbprophet model-selection pmdarima sarimax sklearn sklearn-api sklearn-compatible sklearn-library sktime statsmodels tbats time-series time-series-forecasting transformer wrapper

Keywords from Contributors

automl
Last synced: 5 months ago · JSON representation

Repository

A library that unifies the API for most commonly used libraries and modeling techniques for time-series forecasting in the Python ecosystem.

Basic Info
Statistics
  • Stars: 150
  • Watchers: 10
  • Forks: 20
  • Open Issues: 17
  • Releases: 13
Topics
cross-validation data-science fbprophet model-selection pmdarima sarimax sklearn sklearn-api sklearn-compatible sklearn-library sktime statsmodels tbats time-series time-series-forecasting transformer wrapper
Created over 5 years ago · Last pushed almost 2 years ago
Metadata Files
Readme Changelog License Code of conduct Authors

README.md

CI CD Documentation Status PyPI Version Conda Version Code Coverage Binder License Contributors Code style: black

HCrystal Ball


A library that unifies the API for most commonly
used libraries and modelling techniques for time-series
forecasting in the Python ecosystem.




HCrystal Ball consists of two main parts:

  • Wrappers - which bring different 3rd party libraries to time series compatible sklearn API
  • Model Selection - to enable gridsearch over wrappers, general or custom made transformers and add convenient layer over whole process (access to results, plots, storage, ...)

Documentation

See examples, tutorials, contribution, API and more on the documentation site try notebooks on binder or browse example notebooks in docs/examples directly.

Core Installation

If you want really minimal installation, you can install from pip or from conda-forge

bash pip install hcrystalball

bash conda install -c conda-forge hcrystalball

Typical Installation

Very often you will want to use more wrappers, than just Sklearn, run examples in jupyterlab, or execute model selection in parallel. Getting such dependencies to play together nicely might be cumbersome, so checking envrionment.yml might give you faster start.

```bash

get dependencies file, e.g. using curl

curl -O https://raw.githubusercontent.com/heidelbergcement/hcrystalball/master/environment.yml

check comments in environment.yml, keep or remove as requested, than create environment using

conda env create -f environment.yml

activate the environment

conda activate hcrystalball

if you want to see progress bar in jupyterlab, execute also

jupyter labextension install @jupyter-widgets/jupyterlab-manager

install the library from pip

pip install hcrystalball

or from conda

conda install -c conda-forge hcrystalball ```

Development Installation:

To have everything in place including docs build or executing tests, execute following code

```bash git clone https://github.com/heidelbergcement/hcrystalball cd hcrystalball conda env create -f environment.yml conda activate hcrystalball

ensures interactive progress bar will work in example notebooks

jupyter labextension install @jupyter-widgets/jupyterlab-manager python setup.py develop ```

Example Usage

Wrappers

```python from hcrystalball.utils import generate_tsdata from hcrystalball.wrappers import ProphetWrapper

X, y = generatetsdata(ndates=365*2) Xtrain, ytrain, Xtest, ytest = X[:-10], y[:-10], X[-10:], y[-10:]

model = ProphetWrapper() ypred = model.fit(Xtrain, ytrain).predict(Xtest) y_pred prophet 2018-12-22 6.066999 2018-12-23 6.050076 2018-12-24 6.105620 2018-12-25 6.141953 2018-12-26 6.150229 2018-12-27 6.163615 2018-12-28 6.147420 2018-12-29 6.048633 2018-12-30 6.031711 2018-12-31 6.087255 ```

Model Selection

```python import pandas as pd import matplotlib.pyplot as plt plt.style.use('seaborn') plt.rcParams['figure.figsize'] = [12, 6]

from hcrystalball.utils import getsalesdata from hcrystalball.model_selection import ModelSelector

df = getsalesdata(ndates=200, nassortments=1, nstates=2, nstores=2)

ms = ModelSelector(horizon=10, frequency="D", countrycodecolumn="HolidayCode", )

ms.creategridsearch(nsplits=2, sklearnmodels=True, prophetmodels=False, exog_cols=["Open","Promo","SchoolHoliday","Promo2"], )

ms.selectmodel(df=df, targetcolname="Sales", partitioncolumns=["Assortment", "State","Store"], )

ms.plotresults(plotfrom="2015-06-01", partitions=[{"Assortment":"a","State":"NW","Store":335}] ) ```

GitHub Events

Total
  • Fork event: 1
Last Year
  • Fork event: 1

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 225
  • Total Committers: 6
  • Avg Commits per committer: 37.5
  • Development Distribution Score (DDS): 0.302
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Michal Chromčák m****k@h****m 157
github-actions[bot] g****] 28
Pavel Krizek k****l@s****z 19
Michal Chromcak m****k@r****e 19
Christoph Deil D****h@g****m 1
Hamel Husain h****u@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 23
  • Total pull requests: 53
  • Average time to close issues: 23 days
  • Average time to close pull requests: 3 days
  • Total issue authors: 9
  • Total pull request authors: 6
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.58
  • Merged pull requests: 46
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • MichalChromcak (15)
  • allen44 (1)
  • lucheroni (1)
  • pavelkrizek (1)
  • carlosg-m (1)
  • Sandy4321 (1)
  • mloning (1)
  • DManowitz (1)
  • aiwalter (1)
Pull Request Authors
  • MichalChromcak (43)
  • pavelkrizek (5)
  • SmirnGregHM (2)
  • cdeil (1)
  • hamelsmu (1)
  • ambader (1)
Top Labels
Issue Labels
enhancement (15) bug (7) question (2) documentation (1) on-hold (1) help wanted (1)
Pull Request Labels
documentation (14) enhancement (13) bug (8) on-hold (1) good first issue (1)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 14,720 last-month
  • Total docker downloads: 532
  • Total dependent packages: 4
    (may contain duplicates)
  • Total dependent repositories: 8
    (may contain duplicates)
  • Total versions: 26
  • Total maintainers: 3
pypi.org: hcrystalball

A library that unifies the API for most commonly used libraries and modelling techniques for time-series forecasting in the Python ecosystem.

  • Versions: 16
  • Dependent Packages: 3
  • Dependent Repositories: 8
  • Downloads: 14,720 Last month
  • Docker Downloads: 532
Rankings
Downloads: 1.8%
Dependent packages count: 2.4%
Docker downloads count: 2.5%
Average: 3.0%
Dependent repos count: 5.2%
Last synced: 6 months ago
conda-forge.org: hcrystalball
  • Versions: 10
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Stargazers count: 26.8%
Dependent packages count: 28.8%
Average: 30.6%
Forks count: 32.6%
Dependent repos count: 34.0%
Last synced: 6 months ago

Dependencies

.github/workflows/cd.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/ci.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • codecov/codecov-action v1 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/precache_binder.yml actions
  • actions/checkout v2 composite
  • jupyterhub/repo2docker-action master composite
binder/Dockerfile docker
  • heidelbergcementds/hcrystalball 11166bd26f30 build
setup.py pypi
environment.yml pypi
  • black *
  • flake8 *
  • isort *
  • nbstripout *
  • pmdarima ==1.8.5
  • pytest *
  • pytest-cov *
  • tbats ==1.1.0