Forecasting utilities, time-series preprocessing, rolling back-test and ensemble forecasting from model selection
Project description
fcst
Package repo on PyPI: fcst - PyPI
Installation
uv add fcst
Features
This package provides you with these sub-modules
- 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.
- forecasting
This provides you with the basic functionality of
fit()andpredict(), given that you pass in the model. - evaluation This provides you with back-test and model selection functionalities.
- preprocessing This allows you to prepare your dataframes, preprocess the time-series data, fill in the missing dates automatically.
- horizon
This is an API for dealing with future horizon from
sktime. But in some modules, it will also do this automatically. - models Gives you the base models for you to work with. Provides you with the basic models, default (fallback) and zero predictor.
- metrics Our own implementation of forecasting performance metrics.
- 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,
models=base_models,
backtest_periods=5,
eval_periods=2,
top_n=2,
forecasting_periods=3,
parallel=True,
)
# Do something with the results
def format_and_upload_results(df_results):
...
Project details
Release history Release notifications | RSS feed
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.1.0.tar.gz
(39.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
fcst-0.1.0-py3-none-any.whl
(15.5 kB
view details)
File details
Details for the file fcst-0.1.0.tar.gz.
File metadata
- Download URL: fcst-0.1.0.tar.gz
- Upload date:
- Size: 39.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffca7eb9355f8e35bfed9c0eb2ad53521fcd5f03d69795236061899adacf169a
|
|
| MD5 |
fb2a1200962c6a48f6ac7a88842d594f
|
|
| BLAKE2b-256 |
77186064fdaee06b722a114adb0c46e7df1b2f51da3257aa07d35c6381a6adf9
|
File details
Details for the file fcst-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fcst-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
287871e0b812e396331d0eab8a2097fc7734460e7d00470907201f0114caf5f8
|
|
| MD5 |
13641132fa72c524d0ccaad36f1dfb8c
|
|
| BLAKE2b-256 |
227bb5896acfa546c879f020b82f1764b3c62c3a8aee6071d2b2913d265e10e2
|