Metadata-Version: 2.1
Name: ts_hyperparam_opt
Version: 0.1.3
Summary: Convenience package for parallelized hyperparameter optimization (e.g. in Jupyter Notebooks) using grid search and CV
Author: nick2202
License: MIT License
        
        Copyright (c) 2023 nick2202
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/nick2202/ts-hyperparam-opt
Project-URL: Bug Tracker, https://github.com/nick2202/ts-hyperparam-opt/issues
Keywords: python,time series,hyperparameter optimization,cross validation,parallel
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE



# Time Series Hyperparameter Optimization (CV + Parallel)

Convenience package for optimizing hyperparameters for Time Series forecasting
using methods like _ExponentialSmoothing_ or _SARIMAX_. Especially useful
for Jupyter Notebooks where parallelization (with e.g. `ProcessPoolExecutor`)
only works when importing the function used in parallel.

## Install it from PyPI

```bash
pip install ts-hyperparam-opt
```

## Usage

```py
from ts_hyperparam_opt import parallel_hyperparameter_optimization as pho

params_sarima = [
    [(1,1,1), (1,1,1,7)],
    [(1,1,0), (1,1,1,7)]
    ]

if __name__ == '__main__':
    freeze_support()
    results = process_map(functools.partial(pho.optimize_hyperparams,
                            data=df_data, func="sarima", 
                            n_steps=15), params_sarima)
    results_sorted = pho.sort_results(results)
```

## Development

Alpha Version

Currently supported methods:
- (Triple) Exponential Smoothing (Holt-Winters)
- SARIMA(X)
