Skip to main content

Welcome to sktime

A unified interface for machine learning with time series

🚀 Version 0.16.1 out now! Check out the release notes here.

sktime is a library for time series analysis in Python. It provides a unified interface for multiple time series learning tasks. Currently, this includes time series classification, regression, clustering, annotation and forecasting. It comes with time series algorithms and scikit-learn compatible tools to build, tune and validate time series models.

Overview
CI/CD github-actions !codecov readthedocs platform
Code !pypi !conda !python-versions !black Binder
Downloads Downloads Downloads Downloads
Community !discord !slack !twitter !youtube
Citation !zenodo

📚 Documentation

Documentation
⭐ Tutorials New to sktime? Here's everything you need to know!
📋 Binder Notebooks Example notebooks to play with in your browser.
👩‍💻 User Guides How to use sktime and its features.
✂️ Extension Templates How to build your own estimator using sktime's API.
🎛️ API Reference The detailed reference for sktime's API.
📺 Video Tutorial Our video tutorial from 2021 PyData Global.
🛠️ Changelog Changes and version history.
🌳 Roadmap sktime's software and community development plan.
📝 Related Software A list of related software.

💬 Where to ask questions

Questions and feedback are extremely welcome! Please understand that we won't be able to provide individual support via email. We also believe that help is much more valuable if it's shared publicly, so that more people can benefit from it.

Type Platforms
🐛 Bug Reports GitHub Issue Tracker
✨ Feature Requests & Ideas GitHub Issue Tracker
👩‍💻 Usage Questions GitHub Discussions · Stack Overflow
💬 General Discussion GitHub Discussions
🏭 Contribution & Development [Slack], contributors channel · Discord
🌐 Community collaboration session Discord - Fridays 1pm UTC, dev/meet-ups channel

💫 Features

Our aim is to make the time series analysis ecosystem more interoperable and usable as a whole. sktime provides a unified interface for distinct but related time series learning tasks. It features dedicated time series algorithms and tools for composite model building including pipelining, ensembling, tuning and reduction that enables users to apply an algorithm for one task to another.

sktime also provides interfaces to related libraries, for example scikit-learn, statsmodels, tsfresh, PyOD and fbprophet, among others.

For deep learning, see our companion package: sktime-dl.

Module Status Links
Forecasting stable Tutorial · API Reference · Extension Template
Time Series Classification stable Tutorial · API Reference · Extension Template
Time Series Regression stable API Reference
Transformations stable API Reference · Extension Template
Time Series Clustering maturing Extension Template
Time Series Distances/Kernels experimental Extension Template
Annotation experimental Extension Template

⏳ Install sktime

For trouble shooting and detailed installation instructions, see the documentation.

  • Operating system: macOS X · Linux · Windows 8.1 or higher
  • Python version: Python 3.7, 3.8, 3.9, 3.10, and 3.11 (only 64 bit)
  • Package managers: pip · conda (via conda-forge)

pip

Using pip, sktime releases are available as source packages and binary wheels. You can see all available wheels here.

pip install sktime

or, with maximum dependencies,

pip install sktime[all_extras]

conda

You can also install sktime from conda via the conda-forge channel. For the feedstock including the build recipe and configuration, check out this repository.

conda install -c conda-forge sktime

or, with maximum dependencies,

conda install -c conda-forge sktime-all-extras

⚡ Quickstart

Forecasting

from sktime.datasets import load_airline
from sktime.forecasting.base import ForecastingHorizon
from sktime.forecasting.model_selection import temporal_train_test_split
from sktime.forecasting.theta import ThetaForecaster
from sktime.performance_metrics.forecasting import mean_absolute_percentage_error

y = load_airline()
y_train, y_test = temporal_train_test_split(y)
fh = ForecastingHorizon(y_test.index, is_relative=False)
forecaster = ThetaForecaster(sp=12)  # monthly seasonal periodicity
forecaster.fit(y_train)
y_pred = forecaster.predict(fh)
mean_absolute_percentage_error(y_test, y_pred)
>>> 0.08661467738190656

Time Series Classification

from sktime.classification.interval_based import TimeSeriesForestClassifier
from sktime.datasets import load_arrow_head
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score

X, y = load_arrow_head()
X_train, X_test, y_train, y_test = train_test_split(X, y)
classifier = TimeSeriesForestClassifier()
classifier.fit(X_train, y_train)
y_pred = classifier.predict(X_test)
accuracy_score(y_test, y_pred)
>>> 0.8679245283018868

👋 How to get involved

There are many ways to join the sktime community. We follow the all-contributors specification: all kinds of contributions are welcome - not just code.

Documentation
💝 Contribute How to contribute to sktime.
🎒 Mentoring New to open source? Apply to our mentoring program!
📅 Meetings Join our discussions, tutorials, workshops and sprints!
👩‍🔧 Developer Guides How to further develop sktime's code base.
🚧 Enhancement Proposals Design a new feature for sktime.
🏅 Contributors A list of all contributors.
🙋 Roles An overview of our core community roles.
💸 Donate Fund sktime maintenance and development.
🏛️ Governance How and by whom decisions are made in sktime's community.

💡 Project vision

  • by the community, for the community -- developed by a friendly and collaborative community.
  • the right tool for the right task -- helping users to diagnose their learning problem and suitable scientific model types.
  • embedded in state-of-art ecosystems and provider of interoperable interfaces -- interoperable with scikit-learn, statsmodels, tsfresh, and other community favourites.
  • rich model composition and reduction functionality -- build tuning and feature extraction pipelines, solve forecasting tasks with scikit-learn regressors.
  • clean, descriptive specification syntax -- based on modern object-oriented design principles for data science.
  • fair model assessment and benchmarking -- build your models, inspect your models, check your models, avoid pitfalls.
  • easily extensible -- easy extension templates to add your own algorithms compatible with sktime's API.

Metadata

Release files for sktime-backup 0.16.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sktime-backup 0.16.1
File Size Uploaded
sktime-backup-0.16.1.tar.gz 11.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for sktime-backup 0.16.1
File Interpreter ABI Platform
sktime_backup-0.16.1-py3-none-any.whl Python 3 none any Details

Total release size: 31.2 MB

Release files / sktime-backup-0.16.1.tar.gz

Download URL sktime-backup-0.16.1.tar.gz
Size 11.8 MB
Tags Source
SHA-256 checksum
How to use checksums
a074e19a02b468ced1886793da3ed753829c52cf391755e876fb41297b2413a0
BLAKE2b-256 checksum
How to use checksums
c9c11f8feef45a272a286502ce67657f8a67735c2d65116c1e4d48963add1f06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / sktime_backup-0.16.1-py3-none-any.whl

Download URL sktime_backup-0.16.1-py3-none-any.whl
Size 19.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
bcde95b1826247f6e817a1d36de59316b6cda15d98b0665a51cff50d3a64bbac
BLAKE2b-256 checksum
How to use checksums
fe2b62a3065b034f73df3d906ebb9858b534fd7c99747485c33d989958850330
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release history Release notifications | RSS feed

This release

0.16.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page