Skip to main content

Polars Time Series Extension

Project description

Polars Time Series Extension

Welcome to the documentation for the Polars Time Series Extension.


Documentation: https://drumtorben.github.io/polars-ts

Source Code: https://github.com/drumtorben/polars-ts


📖 Overview

The Polars Time Series Extention offers a wide range of metrics, feature extractors, and various tools for time series forecasting.

How to use

The polars-ts plugin is available under the namespace ts. See the following example where we compute the Kaboudan metric:

import polars as pl
from statsforecast import StatsForecast
from statsforecast.models import AutoETS, OptimizedTheta

import polars_ts as pts  # noqa

# Create sample dataframe with columns `unique_id`, `ds`, and `y`.
df = (
    pl.scan_parquet("https://datasets-nixtla.s3.amazonaws.com/m4-hourly.parquet")
    .filter(pl.col("unique_id").is_in(["H1", "H2", "H3"]))
    .collect()
)

# Define models
season_length = 24
models = [
    OptimizedTheta(season_length=season_length, decomposition_type="additive"),
    AutoETS(season_length=season_length),
]
sf = StatsForecast(models=models, freq=1, n_jobs=-1)

# Compute the Kaboudan metric in the `ts` namespace
res = df.ts.kaboudan(sf, block_size=200, backtesting_start=0.5, n_folds=10)

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

polars_timeseries-0.1.0.tar.gz (68.0 kB view details)

Uploaded Source

Built Distributions

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

polars_timeseries-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

polars_timeseries-0.1.0-cp312-abi3-macosx_11_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: polars_timeseries-0.1.0.tar.gz
  • Upload date:
  • Size: 68.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.24

File hashes

Hashes for polars_timeseries-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a5d483c079cde0b489b6265f006a592d679ed8b55f7f074357123316ca88abab
MD5 ed7d07159e0f98a96c5050522e0b0778
BLAKE2b-256 6e5d85621c61287badc69f8be0fafc28dbfede3c3a7ea489a13d66fd4e578e0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_timeseries-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 15153f5b0a0e3e8d4c636f07dee540415db7071313e9b3b7fceded00aa1ed73e
MD5 6ec86a51f67dc1bfd0c74f2c881b2f76
BLAKE2b-256 4f33b1079078532ed9385566030faec157f859cb31804fd8ad3c907cc3665f9e

See more details on using hashes here.

File details

Details for the file polars_timeseries-0.1.0-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for polars_timeseries-0.1.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 149c6f23acbd43b3c585c9aab17eda68a2295ef3e4cd1edee2dbec6d7a8cfca1
MD5 674fcd84001609b2a8bea31d4d21383f
BLAKE2b-256 095a35b59eac97745b6da2a2f013ae6e95975aedd4d4f93ad39ec86734620cb2

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