Skip to main content

A package for imputing missing data in time series

Project description

PyPI - Version Documentation Status Unit tests Codacy Badge

Logo BatchStats timefiller

timefiller is a Python package for time series imputation and forecasting. When applied to a set of correlated time series, each series is processed individually, leveraging correlations with the other series as well as its own auto-regressive patterns. The package is designed to be easy to use, even for non-experts.

Installation

pip install timefiller

Why this package?

While there are other Python packages for similar tasks, this one is lightweight with a straightforward and simple API. Currently, its speed may be a limitation for large datasets, but it can still be quite useful in many cases.

Basic Usage

The simplest usage example:

from timefiller import TimeSeriesImputer

df = load_your_dataset()
tsi = TimeSeriesImputer()
df_imputed = tsi(df)

Advanced Usage

from sklearn.linear_model import LassoCV
from timefiller import TimeSeriesImputer, PositiveOutput

df = load_your_dataset()
tsi = TimeSeriesImputer(estimator=LassoCV(), ar_lags=(1, 2, 3, 6, 24), multivariate_lags=6, preprocessing=PositiveOutput())
df_imputed = tsi(df, subset_cols=['col_1', 'col_17'], after='2024-06-14', n_nearest_features=35)

Check out the documentation for details on available options to customize your imputation.

Algorithmic Approach

timefiller relies heavily on scikit-learn for the learning process and uses optimask to create NaN-free train and predict matrices for the estimator.

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

timefiller-0.1.1.tar.gz (10.8 kB view details)

Uploaded Source

File details

Details for the file timefiller-0.1.1.tar.gz.

File metadata

  • Download URL: timefiller-0.1.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for timefiller-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c2443ec181d5b684361995b351a05ad4a9e09b763ddf6748dd0f7fc3323ff367
MD5 bc831ba926d9385815be0c87d5cf22a4
BLAKE2b-256 49f4a7a61c5dea743e1ef024119f486879d872a1377d9a2597f3ce7a5b383396

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page