Skip to main content

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

mastfm-0.0.2.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mastfm-0.0.2-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file mastfm-0.0.2.tar.gz.

File metadata

  • Download URL: mastfm-0.0.2.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for mastfm-0.0.2.tar.gz
Algorithm Hash digest
SHA256 562aed485e6a0fd54952b8dc638434082b4ec6cddbf3238d4b880a805456245b
MD5 8140ed10c0a658e010e9f0320cda6e0e
BLAKE2b-256 ecb12766e3e8758d4c12ecac6b1d4835c996e9b01143753002a554c9201171e2

See more details on using hashes here.

File details

Details for the file mastfm-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: mastfm-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for mastfm-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a5e564565c441a87538a576c04bb5ea9f82ed1bfea57e262e3370a6734913f1a
MD5 a2a62140c94f848f6092ef467f95c4c1
BLAKE2b-256 d72aaf37e2059e201f341bbb5ff4484b05c5d8196b62d9595aa2b3f2ec1e8f67

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page