MCPcopy Index your code
hub / github.com/sktime/sktime

github.com/sktime/sktime @v1.0.1 sqlite

repository ↗ · DeepWiki ↗ · release v1.0.1 ↗
11,149 symbols 43,943 edges 1,692 files 7,767 documented · 70% 1 cross-repo links
README

Welcome to sktime

A unified interface for machine learning with time series

:rocket: Version 1.0.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 forecasting, time series classification, clustering, anomaly/changepoint detection, and other tasks. It comes with time series algorithms and scikit-learn compatible tools to build, tune, and validate time series models.

Documentation · Tutorials · Release Notes
Open Source BSD 3-clause GC.OS Sponsored
Tutorials Binder !youtube
Community !discord !slack
CI/CD github-actions readthedocs platform
Code !pypi !conda !python-versions !black
Downloads PyPI - Downloads PyPI - Downloads Downloads
Citation !zenodo

:books: Documentation

Documentation
:star: Tutorials New to sktime? Here's everything you need to know!
:clipboard: Binder Notebooks Example notebooks to play with in your browser.
:woman_technologist: Examples How to use sktime and its features.
:scissors: [Extension Templates] How to build your own estimator using sktime's API.
:control_knobs: API Reference The detailed reference for sktime's API.
:tv: Video Tutorial Our video tutorial from 2021 PyData Global.
:hammer_and_wrench: Changelog Changes and version history.
:deciduous_tree: Roadmap sktime's software and community development plan.
:pencil: Related Software A list of related software.

:speech_balloon: Where to ask questions

Questions and feedback are extremely welcome! We strongly believe in the value of sharing help publicly, as it allows a wider audience to benefit from it.

Type Platforms
:bug: Bug Reports GitHub Issue Tracker
:sparkles: Feature Requests & Ideas GitHub Issue Tracker
:woman_technologist: Usage Questions GitHub Discussions · Stack Overflow
:speech_balloon: General Discussion GitHub Discussions
:factory: Contribution & Development dev-chat channel · Discord
:globe_with_meridians: Meet-ups and collaboration sessions Discord - Fridays 13 UTC, dev/meet-ups channel

:dizzy: Features

Our objective is to enhance the interoperability and usability of the time series analysis ecosystem in its entirety. 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, such as pipelining, ensembling, tuning, and reduction, empowering users to apply algorithms designed for one task to another.

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

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 Tutorial · API Reference · Extension Template
Detection tasks maturing Extension Template
Parameter fitting maturing API Reference · Extension Template
Time Series Clustering maturing API Reference · Extension Template
Time Series Distances/Kernels maturing Tutorial · API Reference · Extension Template
Time Series Alignment experimental API Reference · Extension Template
Time Series Splitters maturing Extension Template
Distributions and simulation experimental

:hourglass_flowing_sand: Install sktime

For troubleshooting and detailed installation instructions, see the documentation.

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

pip

Using pip, sktime releases are available as source packages and binary wheels. Available wheels are listed here.

pip install sktime

or, with maximum dependencies,

pip install sktime[all_extras]

For curated sets of soft dependencies for specific learning tasks:

pip install sktime[forecasting]  # for selected forecasting dependencies
pip install sktime[forecasting,transformations]  # forecasters and transformers

or similar. Valid sets are:

  • forecasting
  • transformations
  • classification
  • regression
  • clustering
  • param_est
  • networks
  • detection
  • alignment

Cave: in general, not all soft dependencies for a learning task are installed, only a curated selection.

conda

You can also install sktime from conda via the conda-forge channel. The feedstock including the build recipe and configuration is maintained in this conda-forge repository.

conda install -c conda-forge sktime

or, with maximum dependencies,

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

(as conda does not support dependency sets, flexible choice of soft dependencies is unavailable via conda)

:zap: Quickstart

Forecasting

from sktime.datasets import load_airline
from sktime.forecasting.base import ForecastingHorizon
from sktime.forecasting.theta import ThetaForecaster
from sktime.split import temporal_train_test_split
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

:wave: 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
:gift_heart: [Contribute] How to contribute to sktime.
:school_satchel: [Mentoring] New to open source? Apply to our mentoring program!
:date: [Meetings] Join our discussions, tutorials,

Core symbols most depended-on inside this repo

get_tag
called by 468
sktime/base/_base.py
fit
called by 275
sktime/forecasting/base/_base.py
keys
called by 258
sktime/datasets/base/_base.py
fit_transform
called by 251
sktime/transformations/base/_base.py
_req
called by 231
sktime/datatypes/_base/_common.py
get
called by 216
sktime/datatypes/_base/_base.py
concat
called by 200
sktime/base/_meta.py
mean
called by 190
sktime/base/_proba/_normal.py

Shape

Method 6,197
Function 3,118
Class 1,773
Route 61

Languages

Python100%
TypeScript1%

Modules by API surface

sktime/registry/_tags.py104 symbols
sktime/registry/_base_classes.py84 symbols
sktime/forecasting/compose/_reduce.py83 symbols
sktime/classification/distance_based/_proximity_forest.py77 symbols
sktime/libs/granite_ttm/modeling_tinytimemixer.py71 symbols
sktime/tests/test_all_estimators.py69 symbols
sktime/libs/falcon_tst/modeling_FalconTST.py66 symbols
sktime/forecasting/compose/_pipeline.py63 symbols
sktime/libs/kronos/module.py62 symbols
sktime/datatypes/_panel/_examples.py60 symbols
sktime/datatypes/_series/_examples.py58 symbols
sktime/datatypes/_panel/_convert.py55 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

packaging

For agents

$ claude mcp add sktime \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact