All Projects → WenjieZ → Tscv

WenjieZ / Tscv

Licence: bsd-3-clause
Time Series Cross-Validation -- an extension for scikit-learn

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tscv

Matrixprofile
A Python 3 library making time series data mining tasks, utilizing matrix profile algorithms, accessible to everyone.
Stars: ✭ 141 (-2.76%)
Mutual labels:  data-science, time-series
Tpot
A Python Automated Machine Learning tool that optimizes machine learning pipelines using genetic programming.
Stars: ✭ 8,378 (+5677.93%)
Mutual labels:  data-science, hyperparameter-optimization
Mljar Supervised
Automated Machine Learning Pipeline with Feature Engineering and Hyper-Parameters Tuning 🚀
Stars: ✭ 961 (+562.76%)
Mutual labels:  data-science, hyperparameter-optimization
Hyperparameter hunter
Easy hyperparameter optimization and automatic result saving across machine learning algorithms and libraries
Stars: ✭ 648 (+346.9%)
Mutual labels:  data-science, hyperparameter-optimization
Auto ml
[UNMAINTAINED] Automated machine learning for analytics & production
Stars: ✭ 1,559 (+975.17%)
Mutual labels:  data-science, hyperparameter-optimization
Test Tube
Python library to easily log experiments and parallelize hyperparameter search for neural networks
Stars: ✭ 663 (+357.24%)
Mutual labels:  data-science, hyperparameter-optimization
Mckinsey Smartcities Traffic Prediction
Adventure into using multi attention recurrent neural networks for time-series (city traffic) for the 2017-11-18 McKinsey IronMan (24h non-stop) prediction challenge
Stars: ✭ 49 (-66.21%)
Mutual labels:  data-science, time-series
Atm
Auto Tune Models - A multi-tenant, multi-data system for automated machine learning (model selection and tuning).
Stars: ✭ 504 (+247.59%)
Mutual labels:  data-science, hyperparameter-optimization
Nni
An open source AutoML toolkit for automate machine learning lifecycle, including feature engineering, neural architecture search, model compression and hyper-parameter tuning.
Stars: ✭ 10,698 (+7277.93%)
Mutual labels:  data-science, hyperparameter-optimization
Xcessiv
A web-based application for quick, scalable, and automated hyperparameter tuning and stacked ensembling in Python.
Stars: ✭ 1,255 (+765.52%)
Mutual labels:  data-science, hyperparameter-optimization
Tsfresh
Automatic extraction of relevant features from time series:
Stars: ✭ 6,077 (+4091.03%)
Mutual labels:  data-science, time-series
Automl alex
State-of-the art Automated Machine Learning python library for Tabular Data
Stars: ✭ 132 (-8.97%)
Mutual labels:  data-science, hyperparameter-optimization
Matrixprofile Ts
A Python library for detecting patterns and anomalies in massive datasets using the Matrix Profile
Stars: ✭ 621 (+328.28%)
Mutual labels:  data-science, time-series
H1st
The AI Application Platform We All Need. Human AND Machine Intelligence. Based on experience building AI solutions at Panasonic: robotics predictive maintenance, cold-chain energy optimization, Gigafactory battery mfg, avionics, automotive cybersecurity, and more.
Stars: ✭ 697 (+380.69%)
Mutual labels:  data-science, time-series
Elki
ELKI Data Mining Toolkit
Stars: ✭ 613 (+322.76%)
Mutual labels:  data-science, time-series
Mathematicavsr
Example projects, code, and documents for comparing Mathematica with R.
Stars: ✭ 41 (-71.72%)
Mutual labels:  data-science, time-series
Sktime
A unified framework for machine learning with time series
Stars: ✭ 4,741 (+3169.66%)
Mutual labels:  data-science, time-series
Seglearn
Python module for machine learning time series:
Stars: ✭ 435 (+200%)
Mutual labels:  data-science, time-series
Tsrepr
TSrepr: R package for time series representations
Stars: ✭ 75 (-48.28%)
Mutual labels:  data-science, time-series
Deeplearning Notes
Notes for Deep Learning Specialization Courses led by Andrew Ng.
Stars: ✭ 126 (-13.1%)
Mutual labels:  data-science, hyperparameter-optimization

TSCV: Time Series Cross-Validation

This repository is a scikit-learn extension for time series cross-validation. It introduces gaps between the training set and the test set, which mitigates the temporal dependence of time series and prevents information leakage.

Installation

pip install tscv

Update

pip install tscv --upgrade

Usage

This extension defines 3 cross-validator classes and 1 function:

  • GapLeavePOut
  • GapKFold
  • GapWalkForward
  • gap_train_test_split

The three classes can all be passed, as the cv argument, to the cross_val_score function in scikit-learn, just like the native cross-validator classes in scikit-learn.

The one function is an alternative to the train_test_split function in scikit-learn.

Examples

The following example uses GapKFold instead of KFold as the cross-validator.

import numpy as np
from sklearn import datasets
from sklearn import svm
from sklearn.model_selection import cross_val_score
from tscv import GapKFold

iris = datasets.load_iris()
clf = svm.SVC(kernel='linear', C=1)

# use GapKFold as the cross-validator
cv = GapKFold(n_splits=5, gap_before=5, gap_after=5)
scores = cross_val_score(clf, iris.data, iris.target, cv=cv)

The following example uses gap_train_test_split to split the data set into the training set and the test set.

import numpy as np
from tscv import gap_train_test_split

X, y = np.arange(20).reshape((10, 2)), np.arange(10)
X_train, X_test, y_train, y_test = gap_train_test_split(X, y, test_size=2, gap_size=2)

Contributing

  • Report bugs in the issue tracker
  • Express your use cases in the issue tracker

Authors

This extension is developed mainly by Wenjie Zheng.

The GapWalkForward cross-validator is adapted from the TimeSeriesSplit of scikit-learn (see Kyle Kosic's PR scikit-learn/scikit-learn#13204).

Support

  • If you want to support this project, please consider being a sponsor.
  • If you use this package in your research, please consider citing it in your paper.

Acknowledgments

  • I would like to thank Jeffrey Racine, Christoph Bergmeir, and Prabir Burman for the helpful discussion.

License

BSD-3-Clause

Citation

@article{zheng2019hv,
  title={$ hv $-Block Cross Validation is not a BIBD: a Note on the Paper by Jeff Racine (2000)},
  author={Zheng, Wenjie},
  journal={arXiv preprint arXiv:1910.08904},
  year={2019}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].