Skip to main content

Forecasting utilities, time-series preprocessing, rolling back-test and ensemble forecasting from model selection

Project description

fcst

Publish Tag to PyPI

Package repo on PyPI: fcst - PyPI

Installation

uv add fcst

Features

This package provides you with these sub-modules

  1. automation

    This automatically runs back-test, select the best models, and forecast for you. You can customise whether or not to run in parallel, how many top models to select, etc.

  2. forecasting

    This provides you with the basic functionality of fit() and predict(), given that you pass in the model.

  3. evaluation

    This provides you with back-test and model selection functionalities.

  4. preprocessing

    This allows you to prepare your dataframes, preprocess the time-series data, fill in the missing dates automatically.

  5. horizon

    This is an API for dealing with future horizon from sktime. But in some modules, it will also do this automatically.

  6. models

    Gives you the base models for you to work with. Provides you with the basic models, default (fallback) and zero predictor.

  7. metrics

    Our own implementation of forecasting performance metrics.

  8. common

    Other common functionalities, e.g., types.

Usage

Examples

from fcst.automation import run_forecasting_automation
from fcst.preprocessing.dataframe import prepare_forecasting_df
from fcst.models import base_models
import pandas as pd


df_input = pd.read_csv("path-to-your/file.csv")

data_period_date = pd.Period("2025-02", freq="M")

df_forecasting = prepare_forecasting_df(
    df_raw=df_input,
    min_cap=0,  # Cap the value to not go under 0
    freq="M",
)

df_forecasting_results = run_forecasting_automation(
    df_forecasting,
    value_col="net_amount",
    data_period_date=data_period_date,
    backtest_periods=3,
    eval_periods=2,
    top_n=2,
    forecasting_periods=2,
    return_backtest_results=True,
    parallel=True,
)

# Do something with the results
def format_and_upload_results(df_results):
    ...

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

fcst-0.2.0.tar.gz (85.5 kB view details)

Uploaded Source

Built Distribution

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

fcst-0.2.0-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file fcst-0.2.0.tar.gz.

File metadata

  • Download URL: fcst-0.2.0.tar.gz
  • Upload date:
  • Size: 85.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for fcst-0.2.0.tar.gz
Algorithm Hash digest
SHA256 10144fcbab7b65798be4e74689890972d752a33cc9fb624cfa4d8d7138c76716
MD5 ced49258d6f01eeaefb63a31e8cac01e
BLAKE2b-256 4c88e47c6d88b70eb446de6fd560795d8e86e4029f0a1ea5d94b8bd21f48be25

See more details on using hashes here.

File details

Details for the file fcst-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: fcst-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for fcst-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e23c28c92f94dae352f43bf5f1c20cfc3a2a97d719a170aed7b666fab725e7d
MD5 a0961409967cb8a796b07936b967f379
BLAKE2b-256 76c2d9db6eed0eb38864de876c00dec2c862c0a1e5c599a1c24d0682ba60d6dc

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