Skip to main content

Data preprocessing and feature engineering for time-series forecasting

Project description

faro-prep

Data preprocessing and feature engineering library for time-series forecasting. Fluent chainable API for cleaning, encoding, scaling, and generating time-series features from pandas DataFrames.

Installation

pip install faro-prep

Quick Start

from forecastlib.data import Loader

ds = (
    Loader.from_csv("sales.csv")
    .select(target="sales", datetime="date", group="store")
    .clean.fix_datetime()
    .fill.smart()
    .categorical().encode.auto()
    .numeric().exclude(["sales"]).scale.standard()
    .target().lags([1, 7, 14])
    .target().rolling.mean([7, 30])
    .datetime().features.calendar()
)

df = ds.to_dataframe()

pipeline = ds.to_pipeline()
pipeline.save("pipeline.pkl")

from forecastlib.pipeline import Pipeline
loaded = Pipeline.load("pipeline.pkl")

Features

  • Chainable fluent API on Dataset objects
  • Smart missing value imputation (median, forward-fill, interpolation)
  • Automatic categorical encoding: label, one-hot, ordinal
  • Flexible scaling: standard, minmax, robust, log
  • Time-series features: lags, rolling mean/std/min/max, EWM, diffs
  • Calendar features with cyclical sin/cos encoding, Colombia holidays
  • Train/test splitting with expanding window cross-validation
  • Serializable preprocessing pipelines (save/load as .pkl)

License

MIT

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

faro_prep-0.1.0.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

faro_prep-0.1.0-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file faro_prep-0.1.0.tar.gz.

File metadata

  • Download URL: faro_prep-0.1.0.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for faro_prep-0.1.0.tar.gz
Algorithm Hash digest
SHA256 850c9c5f6897b2946004b03a2f093707f151826fdd234eb900885eb9d98c5e8f
MD5 c47c2094a2a0beabca8e15edb43130eb
BLAKE2b-256 d6002e840133bea88f871a8689901315435694f2ff884d69107e9a133fb76afb

See more details on using hashes here.

File details

Details for the file faro_prep-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: faro_prep-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for faro_prep-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21a2fb9dabb0fc49808d46b6c5815fa832349ec9abb2cf15aad4b6f511641f41
MD5 60568fb2e8c8accc185d7e00c638a4a5
BLAKE2b-256 d333a766f2c6d0380947859e3ba4a84c5389b52cd2b7f6c004d4620861fbee95

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