From 09f7baa089c4f101611ce4da89df1a7bb174b2e6 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Fri, 5 May 2023 11:01:26 +0000 Subject: automatic import of python-hcrystalball --- .gitignore | 1 + python-hcrystalball.spec | 506 +++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 508 insertions(+) create mode 100644 python-hcrystalball.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..de0fd1c 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/hcrystalball-0.1.12.tar.gz diff --git a/python-hcrystalball.spec b/python-hcrystalball.spec new file mode 100644 index 0000000..c5dcd30 --- /dev/null +++ b/python-hcrystalball.spec @@ -0,0 +1,506 @@ +%global _empty_manifest_terminate_build 0 +Name: python-hcrystalball +Version: 0.1.12 +Release: 1 +Summary: A library that unifies the API for most commonly used libraries and modelling techniques for time-series forecasting in the Python ecosystem. +License: mit +URL: https://hcrystalball.readthedocs.io/ +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c4/d8/d4ac5b406a2ce1d40bc605d3b6d7d86d3571bc721c50ea1eb4fad5d6a68a/hcrystalball-0.1.12.tar.gz +BuildArch: noarch + +Requires: python3-numpy +Requires: python3-pandas +Requires: python3-scipy +Requires: python3-workalendar +Requires: python3-scikit-learn +Requires: python3-matplotlib +Requires: python3-pytest +Requires: python3-pytest-cov + +%description +[![CI](https://github.com/heidelbergcement/hcrystalball/workflows/CI/badge.svg)](https://github.com/heidelbergcement/hcrystalball/actions/?query=workflow%3ACI) +[![CD](https://github.com/heidelbergcement/hcrystalball/workflows/CD/badge.svg)](https://github.com/heidelbergcement/hcrystalball/actions?query=workflow%3ACD) +[![Documentation Status](https://readthedocs.org/projects/hcrystalball/badge/?version=latest)](https://hcrystalball.readthedocs.io/en/latest/?badge=latest) +[![PyPI Version](https://img.shields.io/pypi/v/hcrystalball)](https://pypi.org/project/hcrystalball/) +[![Conda Version](https://img.shields.io/conda/vn/conda-forge/hcrystalball)](https://anaconda.org/conda-forge/hcrystalball) +[![Code Coverage](https://codecov.io/gh/heidelbergcement/hcrystalball/branch/master/graph/badge.svg)](https://codecov.io/gh/heidelbergcement/hcrystalball) +[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/heidelbergcement/hcrystalball/master?filepath=docs/examples/) +[![License](https://img.shields.io/github/license/heidelbergcement/hcrystalball)](https://raw.githubusercontent.com/heidelbergcement/hcrystalball/master/LICENSE.txt) +[![Contributors](https://img.shields.io/github/contributors/heidelbergcement/hcrystalball)](https://github.com/heidelbergcement/hcrystalball/graphs/contributors) +[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/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](https://hcrystalball.readthedocs.io/en/latest) try notebooks on [binder](https://mybinder.org/v2/gh/heidelbergcement/hcrystalball/master) or browse example notebooks in [docs/examples](https://github.com/heidelbergcement/hcrystalball/tree/master/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 = generate_tsdata(n_dates=365*2) +X_train, y_train, X_test, y_test = X[:-10], y[:-10], X[-10:], y[-10:] + +model = ProphetWrapper() +y_pred = model.fit(X_train, y_train).predict(X_test) +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 get_sales_data +from hcrystalball.model_selection import ModelSelector + +df = get_sales_data(n_dates=200, + n_assortments=1, + n_states=2, + n_stores=2) + +ms = ModelSelector(horizon=10, + frequency="D", + country_code_column="HolidayCode", + ) + +ms.create_gridsearch(n_splits=2, + sklearn_models=True, + prophet_models=False, + exog_cols=["Open","Promo","SchoolHoliday","Promo2"], + ) + +ms.select_model(df=df, + target_col_name="Sales", + partition_columns=["Assortment", "State","Store"], + ) + +ms.plot_results(plot_from="2015-06-01", + partitions=[{"Assortment":"a","State":"NW","Store":335}] + ) +``` + + + + + + +%package -n python3-hcrystalball +Summary: A library that unifies the API for most commonly used libraries and modelling techniques for time-series forecasting in the Python ecosystem. +Provides: python-hcrystalball +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-hcrystalball +[![CI](https://github.com/heidelbergcement/hcrystalball/workflows/CI/badge.svg)](https://github.com/heidelbergcement/hcrystalball/actions/?query=workflow%3ACI) +[![CD](https://github.com/heidelbergcement/hcrystalball/workflows/CD/badge.svg)](https://github.com/heidelbergcement/hcrystalball/actions?query=workflow%3ACD) +[![Documentation Status](https://readthedocs.org/projects/hcrystalball/badge/?version=latest)](https://hcrystalball.readthedocs.io/en/latest/?badge=latest) +[![PyPI Version](https://img.shields.io/pypi/v/hcrystalball)](https://pypi.org/project/hcrystalball/) +[![Conda Version](https://img.shields.io/conda/vn/conda-forge/hcrystalball)](https://anaconda.org/conda-forge/hcrystalball) +[![Code Coverage](https://codecov.io/gh/heidelbergcement/hcrystalball/branch/master/graph/badge.svg)](https://codecov.io/gh/heidelbergcement/hcrystalball) +[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/heidelbergcement/hcrystalball/master?filepath=docs/examples/) +[![License](https://img.shields.io/github/license/heidelbergcement/hcrystalball)](https://raw.githubusercontent.com/heidelbergcement/hcrystalball/master/LICENSE.txt) +[![Contributors](https://img.shields.io/github/contributors/heidelbergcement/hcrystalball)](https://github.com/heidelbergcement/hcrystalball/graphs/contributors) +[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/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](https://hcrystalball.readthedocs.io/en/latest) try notebooks on [binder](https://mybinder.org/v2/gh/heidelbergcement/hcrystalball/master) or browse example notebooks in [docs/examples](https://github.com/heidelbergcement/hcrystalball/tree/master/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 = generate_tsdata(n_dates=365*2) +X_train, y_train, X_test, y_test = X[:-10], y[:-10], X[-10:], y[-10:] + +model = ProphetWrapper() +y_pred = model.fit(X_train, y_train).predict(X_test) +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 get_sales_data +from hcrystalball.model_selection import ModelSelector + +df = get_sales_data(n_dates=200, + n_assortments=1, + n_states=2, + n_stores=2) + +ms = ModelSelector(horizon=10, + frequency="D", + country_code_column="HolidayCode", + ) + +ms.create_gridsearch(n_splits=2, + sklearn_models=True, + prophet_models=False, + exog_cols=["Open","Promo","SchoolHoliday","Promo2"], + ) + +ms.select_model(df=df, + target_col_name="Sales", + partition_columns=["Assortment", "State","Store"], + ) + +ms.plot_results(plot_from="2015-06-01", + partitions=[{"Assortment":"a","State":"NW","Store":335}] + ) +``` + + + + + + +%package help +Summary: Development documents and examples for hcrystalball +Provides: python3-hcrystalball-doc +%description help +[![CI](https://github.com/heidelbergcement/hcrystalball/workflows/CI/badge.svg)](https://github.com/heidelbergcement/hcrystalball/actions/?query=workflow%3ACI) +[![CD](https://github.com/heidelbergcement/hcrystalball/workflows/CD/badge.svg)](https://github.com/heidelbergcement/hcrystalball/actions?query=workflow%3ACD) +[![Documentation Status](https://readthedocs.org/projects/hcrystalball/badge/?version=latest)](https://hcrystalball.readthedocs.io/en/latest/?badge=latest) +[![PyPI Version](https://img.shields.io/pypi/v/hcrystalball)](https://pypi.org/project/hcrystalball/) +[![Conda Version](https://img.shields.io/conda/vn/conda-forge/hcrystalball)](https://anaconda.org/conda-forge/hcrystalball) +[![Code Coverage](https://codecov.io/gh/heidelbergcement/hcrystalball/branch/master/graph/badge.svg)](https://codecov.io/gh/heidelbergcement/hcrystalball) +[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/heidelbergcement/hcrystalball/master?filepath=docs/examples/) +[![License](https://img.shields.io/github/license/heidelbergcement/hcrystalball)](https://raw.githubusercontent.com/heidelbergcement/hcrystalball/master/LICENSE.txt) +[![Contributors](https://img.shields.io/github/contributors/heidelbergcement/hcrystalball)](https://github.com/heidelbergcement/hcrystalball/graphs/contributors) +[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/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](https://hcrystalball.readthedocs.io/en/latest) try notebooks on [binder](https://mybinder.org/v2/gh/heidelbergcement/hcrystalball/master) or browse example notebooks in [docs/examples](https://github.com/heidelbergcement/hcrystalball/tree/master/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 = generate_tsdata(n_dates=365*2) +X_train, y_train, X_test, y_test = X[:-10], y[:-10], X[-10:], y[-10:] + +model = ProphetWrapper() +y_pred = model.fit(X_train, y_train).predict(X_test) +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 get_sales_data +from hcrystalball.model_selection import ModelSelector + +df = get_sales_data(n_dates=200, + n_assortments=1, + n_states=2, + n_stores=2) + +ms = ModelSelector(horizon=10, + frequency="D", + country_code_column="HolidayCode", + ) + +ms.create_gridsearch(n_splits=2, + sklearn_models=True, + prophet_models=False, + exog_cols=["Open","Promo","SchoolHoliday","Promo2"], + ) + +ms.select_model(df=df, + target_col_name="Sales", + partition_columns=["Assortment", "State","Store"], + ) + +ms.plot_results(plot_from="2015-06-01", + partitions=[{"Assortment":"a","State":"NW","Store":335}] + ) +``` + + + + + + +%prep +%autosetup -n hcrystalball-0.1.12 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-hcrystalball -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot - 0.1.12-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..2c00af7 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +9ab2fcf9dec7b89c8a86f824e00d5afc hcrystalball-0.1.12.tar.gz -- cgit v1.2.3