Skip to main content

A package for Meta-learning and data Augmentation for Stress Testing Forecasting Models

Project description

mastfm

fig

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
  • 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.1.tar.gz (12.8 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.1-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mastfm-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f0cc9c90cb94ef6fd171f4d7ad96a68625807812576af99e2f64e4d5a6b71e86
MD5 a2d8ce14633ab4200379832868a6ca41
BLAKE2b-256 6ecb902e1600b24643d7b30fc9805737c7453910d58ec279d15ed163aba41ba2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mastfm-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 802f302cf1fb23431fd6880dc4c6450d6f204b2ce740bd8f989f159b0cbc674d
MD5 b1c361c66cb7712cd1fb1675d113dd8d
BLAKE2b-256 b78de09838a63e1a73c5adca419963303809622f5b35045c76033f2f682fe3bf

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