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,
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
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
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
File details
Details for the file fcst-0.3.0.tar.gz.
File metadata
- Download URL: fcst-0.3.0.tar.gz
- Upload date:
- Size: 86.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7953feddee87165bdabd9f67854c2c85801d393558e5c74bc03d9044bf539534
|
|
| MD5 |
89a7932116c52c8d75c2ccbc0bd3ade3
|
|
| BLAKE2b-256 |
3ae06986c6dca010b9fa290340750e4f4b79c148ab8ea8b37a718ea59b0b9e73
|
File details
Details for the file fcst-0.3.0-py3-none-any.whl.
File metadata
- Download URL: fcst-0.3.0-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ac996b7e296235b5a956a1bf0e2db742d74c96ffc54fc06013b0846b13803f1
|
|
| MD5 |
0f793442d91e792221edc1be101630c4
|
|
| BLAKE2b-256 |
ec5d4479e3aa7dbeaa5cb33c3159ecdc23306c6300415dd8ebe13de97c38bd74
|