A package for Meta-learning and data Augmentation for Stress Testing Forecasting Models
Project description
mastfm
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:
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:
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mastfm-0.0.3.tar.gz.
File metadata
- Download URL: mastfm-0.0.3.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
407b18754b0460cfd41183e80ff92b4401075a2abc1750426de7565f449ddcbc
|
|
| MD5 |
6bd53c6ebe6c07a03d5dfd00c2ee5e5c
|
|
| BLAKE2b-256 |
0b551e49a5d281331c1290c48092a5345f1c12b0fb6985f276ccd02925a5bea8
|
File details
Details for the file mastfm-0.0.3-py3-none-any.whl.
File metadata
- Download URL: mastfm-0.0.3-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa1b2119e7056354b4ee24f8c9e12519d9117a48ff11b6d2210c376c4b894d7a
|
|
| MD5 |
0318331fa98fa1e84ec5af8a3a169c6f
|
|
| BLAKE2b-256 |
af2e850fad51392cbee58cc3b901ab5c66cd86e6720ea2889787b1557267109e
|