Skip to main content

Package for time series forecasting

Project description

Welcome to sklearn-ts

Testing time series forecasting models made easy :) This package leverages scikit-learn, simply tuning it where needed for time series specific purposes.

Main features include:

  • Moving window time split
    • train-test split
    • CV on moving window time splits
  • Model wrappers:
    • Neural networks

Other python packages in the time series domain:

Installation

pip install sklearn-ts

Quickstart

Forecasting COVID-19 with Linear Regression

from sklearn_ts.datasets.covid import load_covid
from sklearn.linear_model import LinearRegression
from sklearn_ts.validator import check_model

dataset = load_covid()['dataset']
dataset['month'] = dataset['date'].dt.month

params = {'fit_intercept': [False, True]}
regressor = LinearRegression()

results = check_model(
    regressor, params, dataset,
    target='new_cases', features=['month'], categorical_features=[], user_transformers=[],
    h=14, n_splits=2, gap=14,
    plotting=True
)

alt text

Forecasting models

Model family Model Univariate
Benchmark Naive 1
Exponential Smoothing SES 1
Exponential Smoothing Holt's linear 1
Exponential Smoothing Holt-Winter 1
- Prophet
Neural networks ANN
Neural networks LSTM
Neural networks TCN

Documentation

Tutorial notebooks:

Development roadmap

  • TCN przewaga
  • Regularization
  • XGBoost drawing
  • FEATURES + SHAP
  • x13
  • prettier plot
  • Handling many observations per date
  • Constant window for forecasting
  • For NN - chart of how it learned
  • Logging
  • Read the docs
  • prod
  • save picture optional
  • PI Coverage
  • Watermark
  • OLS pi
  • AIC / BIC penalizing coefficients / weights param vs hypreparams reg l1 l2, drop out, data augment, eartly stopping
  • one step ahead forecast and again forecast etc
  • pi for prophet - explaining how they are formulated
  • tcn missing arrow
  • tcn details
  • t-test
  • iterative one step ahead

JOURNAL

  • daily but complicated -mae

  • residuals normality as part of performance evaluation

  • decide which measure to show

  • those without features and pi still working

  • czasem się nie przelicza - co wtedy? Zliczać błędne / 100?

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

sklearn-ts-0.0.6.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

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

sklearn_ts-0.0.6-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file sklearn-ts-0.0.6.tar.gz.

File metadata

  • Download URL: sklearn-ts-0.0.6.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10

File hashes

Hashes for sklearn-ts-0.0.6.tar.gz
Algorithm Hash digest
SHA256 ec7098827c73d93ced5b0ee7263a3916efb3d4e33774de7449889a6f8b533df0
MD5 fef7dca3a37a6741b616ce022100fc0c
BLAKE2b-256 d805e227d134b862be93addf5fc31ebd0f186b7d68c9d2645ffa8057ce799ded

See more details on using hashes here.

File details

Details for the file sklearn_ts-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: sklearn_ts-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10

File hashes

Hashes for sklearn_ts-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 94e7eab07450756a2bd3d82501a32ec810ddfc50bac96cf1340e6373bddd3692
MD5 c10aeb3204fc24bf17fa9b07c84f7693
BLAKE2b-256 b36dfa8e198990187d0162744ba744c6bc5a2cbd81afba1c3a81daec610a0fee

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