Skip to content

lady-pandas/sklearn-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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?

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published