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
  • shapiq
  • 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.4.tar.gz (14.3 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.4-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mastfm-0.0.4.tar.gz
  • Upload date:
  • Size: 14.3 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.4.tar.gz
Algorithm Hash digest
SHA256 8cf8d92e87052947e35b5e9ecd0af43b31d1d998e46b9acec096f5a01eb60a30
MD5 6624c4bf8b1b55a10edc54e9de4a4bfc
BLAKE2b-256 c06af141675b1b885439eee9d60677366b3b45d07a63afa13271071ba1f2adfc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mastfm-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 15.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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6dd78243b346c1cfe08684b6394b8dc4faf22a0b3fd41f825ae39ca1c8f30977
MD5 03b47d765f91288fda38dd9d86efe887
BLAKE2b-256 56ce39417847054c55ae27e1501ee4fbd6cdcb04065f3a56244b79237f065086

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