Getting Started

How to get started with Tslearn

1

Install tslearn

Install via conda using 'conda install -c conda-forge tslearn' or pip with 'python -m pip install tslearn'.

2

Import and Load Data

Import tslearn modules and load time series data from sources like UCR datasets or NumPy arrays.

3

Select Backend

Optionally select computational backend using 'from tslearn.backend import instantiate_backend'.

4

Fit a Model

Create and fit a model, for example 'from tslearn.clustering import TimeSeriesKMeans; model = TimeSeriesKMeans(n_clusters=3).fit(X)'.

5

Predict or Analyze

Use the fitted model to predict or analyze data, e.g., 'labels = model.predict(X)'.