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.3.tar.gz (13.1 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.3-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

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

Hashes for mastfm-0.0.3.tar.gz
Algorithm Hash digest
SHA256 407b18754b0460cfd41183e80ff92b4401075a2abc1750426de7565f449ddcbc
MD5 6bd53c6ebe6c07a03d5dfd00c2ee5e5c
BLAKE2b-256 0b551e49a5d281331c1290c48092a5345f1c12b0fb6985f276ccd02925a5bea8

See more details on using hashes here.

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

Hashes for mastfm-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fa1b2119e7056354b4ee24f8c9e12519d9117a48ff11b6d2210c376c4b894d7a
MD5 0318331fa98fa1e84ec5af8a3a169c6f
BLAKE2b-256 af2e850fad51392cbee58cc3b901ab5c66cd86e6720ea2889787b1557267109e

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