sktime companion package for deep learning based on TensorFlow





GitHub Stars



Last Commit

17d ago










NOTE: sktime-dl is currently being updated to work correctly with sktime 0.6, and wwill be fully relaunched over the summer. The plan is

  1. Refactor and update classifiers (documentation etc)
  2. Import pytorch, add a pytorch classifier
  3. Add a forecasting module
  4. Review literature on the latest dl classifiers, assimilate and evaluate any worth including
  5. Update devops so it exactly mirror sktime


  1. Update it to be compliant with sktime 0.6 (currently works with sktime 0.4)

|travis| |pypi| |gitter| |Binder|

.. |travis| image:: .. _travis:

.. |pypi| image:: .. _pypi:

.. |gitter| image:: .. _gitter:

.. |binder| image:: .. _Binder:


An extension package for deep learning with Tensorflow/Keras for sktime <>, a scikit-learn <> compatible Python toolbox for learning with time series and panel data.

sktime-dl is under development and currently in a state of flux.


A repository for off-the-shelf networks

The aim is to define Keras networks able to be directly used within sktime and its pipelining and strategy tools, and by extension scikit-learn, for use in applications and research. Over time, we wish to interface or implement a wide range of networks from the literature in the context of time series analysis.


Currently, we interface with a number of networks for time series classification in particular. A large part of the current toolset serves as an interface to `dl-4-tsc <>`__, and implements the following network architectures: 

- Time convolutional neural network (CNN)
- Encoder (Encoder)
- Fully convolutional neural network (FCNN)
- Multi channel deep convolutional neural network (MCDCNN)
- Multi-scale convolutional neural network (MCNN)
- Multi layer perceptron (MLP)
- Residual network (ResNet)
- Time Le-Net (TLeNet)
- Time warping invariant echo state network (TWIESN)

We also interface with `InceptionTime <>`__, as of writing the strongest deep learning approach to general time series classification. 

- Inception network, singular. 


Most of the classifier architectures have been adapted to also provide regressors. These are:

- Time convolutional neural network (CNN)
- Encoder (Encoder)
- Fully convolutional neural network (FCNN)
- Multi layer perceptron (MLP)
- Residual network (ResNet)
- Time Le-Net (TLeNet)
- InceptionTime (Inception)


The regression networks can also be used to perform time series forecasting via sktime's `reduction strategies <>`__. 

We aim to incorporate bespoke forecasting networks in future updates, both specific architectures and general RNNs/LSTMs. 


-   Hyper-parameter tuning (through calls to sci-kit learn's Grid and RandomizedSearch tools, currently) 
-   Ensembling methods (over different random initialisations for stability) 
These act as wrappers to networks, and can be used in high-level and experimental pipelines as with any sktime model. 


sktime-dl is an extension package to sktime, primarily introducing different learning algorithms. All `examples <>`__ and `documentation <>`__ on higher level funtionality and usage from the base sktime apply to this package. 

Documentation specifically for sktime-dl shall be produced in due course.

Example notebooks for sktime-dl usage can be found under the examples folder.

Former and current active contributors are as follows:

James Large (@James-Large, `@jammylarge <>`__,, Aaron Bostrom (@ABostrom), Hassan Ismail Fawaz (@hfawaz), Markus Löning (@mloning), @Withington


The simplest installation method is to install in a new environment via pip:
    # if using anaconda for environment management
    conda create -n sktime-dl python=3.6
    conda activate sktime-dl

    # if using virtualenv for environment management
    virtualenv sktime-dl
    source bin/activate            #unix
    sktime-dl\Scipts\activate      #windows

    pip install sktime-dl

sktime-dl is under development. To ensure that you're using the most up to date code, you can instead install the development version in your environment:
    git clone
    cd sktime-dl
    git checkout dev
    git pull origin dev
    pip install .

When installing sktime-dl from scratch, the latest stable version of
`Tensorflow <>`__ 2.x will be installed.
Tensorflow 1.x is also supported beyond 1.9, if you have an existing
installation in your environment that you wish to maintain.

Users with Tensorflow versions older than 2.1.0 shall also need to install
`keras-contrib <>`__ after installing
sktime-dl, using the `installation instructions for
tf.keras <>`__.

Using GPUS

With the above instructions, the networks can be run out the box on your CPU. If
you wish to run the networks on an NVIDIA® GPU, you can:

- use Docker (see below)


- install extra drivers and toolkits (GPU drivers, CUDA Toolkit, and CUDNN library). See `this page <>`__ for links and instructions, and also `this page <>`__ for a list of definite versioning compatabilities.


Follow `Tensorflow's instuctions <>`__ to install Docker and nvidia-docker (Linux only).

Build the sktime-dl Docker image:
    cd sktime-dl
    docker build -t sktime_dl .

Run a container with GPU support using the image:
    docker run --gpus all --rm -it sktime_dl:latest

Run all the tests with:
    pytest -v --cov=sktime_dl

or exclude the long-running tests with:
    pytest -v -m="not slow" --cov=sktime_dl --pyargs sktime_dl


To run this Docker container on CPU, replace the above ``docker run`` command with:
    docker run --rm -it sktime_dl:latest

Rate & Review

Great Documentation0
Easy to Use0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Unwelcoming Community0