Metadata-Version: 2.2
Name: mastfm
Version: 0.0.3
Summary: A package for Meta-learning and data Augmentation for Stress Testing Forecasting Models
Home-page: https://github.com/ricardoinaciopt/mastfm
Author: Ricardo Inácio
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
Requires-Dist: numpy==1.26
Requires-Dist: pandas==2.2.2
Requires-Dist: scikit-learn>=1.5.2
Requires-Dist: shap>=0.46.0
Requires-Dist: imbalanced-learn>=0.12.4
Requires-Dist: matplotlib>=3.9.2
Requires-Dist: xgboost>=2.1.1
Requires-Dist: lightgbm>=4.5.0
Requires-Dist: tqdm
Requires-Dist: tsfeatures>=0.4.5
Requires-Dist: mlforecast>=0.13.4
Requires-Dist: metaforecast==0.1.5

# mastfm

![](https://github.com/ricardoinaciopt/mastfm/blob/main/mastfm-header.png?raw=true)

`mastfm` is a package for Meta-learning and data Augmentation for Stress Testing. It provides tools to interpret forecasting models by leveraging meta-learning techniques and various data augmentation methods.

## Installation

You can install the `mastfm` package using pip:

```sh
pip install mastfm
```

## Requirements

- numpy
- pandas
- scikit-learn
- shap
- matplotlib
- imbalanced-learn
- tsfeatures
- xgboost
- lightgbm
- tqdm
- mlforecast

## Usage

Here is a simple example of how to use the `mastfm` package:

```python
import pandas as pd
from mastfm import MAST
from xgboost import XGBRegressor as xgb

# Load your data into a pandas DataFrame
df = pd.read_csv('your_dataset.csv')

# Initialize the MAST class
mast = MASTFM(
    forecasting_model=xgb(),
    seasonality=12,
    frequency="M",
    horizon=12,
    level=80,
    quantile=80,
    augmentation_method="ADASYN",
)
mast.fit(df=df, target_differences=1)
mast.plot_stress(save=True)
mast.explanations(save=True)
```

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Author

Ricardo Inácio
