API Documentation

Full API documentation of the pyts Python package.

pyts.approximation: Approximation algorithms

The pyts.approximation module includes approximation algorithms.

approximation.PiecewiseAggregateApproximation([…]) Piecewise Aggregate Approximation.
approximation.SymbolicAggregateApproximation([…]) Symbolic Aggregate approXimation.
approximation.DiscreteFourierTransform([…]) Discrete Fourier Transform.
approximation.MultipleCoefficientBinning([…]) Bin continuous data into intervals column-wise.
approximation.SymbolicFourierApproximation([…]) Symbolic Fourier Approximation.

pyts.bag_of_words: Bag-of-words algorithms

The pyts.bag_of_words module includes bag-of-patterns algorithms.

bag_of_words.BagOfWords([window_size, …]) Transform time series into bag of words.

pyts.classification: Classification algorithms

The pyts.classification module includes classification algorithms.

classification.KNeighborsClassifier([…]) k-nearest neighbors classifier.
classification.SAXVSM([n_bins, strategy, …]) Classifier based on SAX-VSM representation and tf-idf statistics.
classification.BOSSVS([word_size, n_bins, …]) Bag-of-SFA Symbols in Vector Space.

pyts.datasets: Dataset loading utilities

The pyts.datasets module tools for making, loading and fetching time series datasets.

datasets.fetch_ucr_dataset(dataset[, …]) Fetch dataset from UCR TSC Archive by name.
datasets.fetch_uea_dataset(dataset[, …]) Fetch dataset from UEA TSC Archive by name.
datasets.load_basic_motions([return_X_y]) Load and return the Basic Motions dataset.
datasets.load_coffee([return_X_y]) Load and return the Coffee dataset.
datasets.load_gunpoint([return_X_y]) Load and return the GunPoint dataset.
datasets.load_pig_central_venous_pressure([…]) Load and return the PigCVP dataset.
datasets.make_cylinder_bell_funnel([…]) Make a Cylinder-Bell-Funnel dataset.
datasets.ucr_dataset_info([dataset]) Information about the UCR datasets.
datasets.ucr_dataset_list() List of available UCR datasets.
datasets.uea_dataset_info([dataset]) Information about the UEA datasets.
datasets.uea_dataset_list() List of available UEA datasets.

pyts.decomposition: Decomposition algorithms

The pyts.decomposition module includes decomposition algorithms.

decomposition.SingularSpectrumAnalysis([…]) Singular Spectrum Analysis.

pyts.image: Imaging algorithms

The pyts.image module includes algorithms that transform times series into images.

image.RecurrencePlot([dimension, …]) Recurrence Plot.
image.GramianAngularField([image_size, …]) Gramian Angular Field.
image.MarkovTransitionField([image_size, …]) Markov Transition Field.

pyts.metrics: Metrics

The pyts.metrics module includes metrics.

metrics.boss(x, y) Return the BOSS distance between two arrays.
metrics.dtw([x, y, dist, method, options, …]) Dynamic Time Warping (DTW) distance between two samples.
metrics.dtw_classic([x, y, dist, …]) Classic Dynamic Time Warping (DTW) distance between two time series.
metrics.dtw_region([x, y, dist, region, …]) Dynamic Time Warping (DTW) distance with a constraint region.
metrics.dtw_sakoechiba([x, y, dist, …]) Dynamic Time Warping (DTW) distance with Sakoe-Chiba band constraint.
metrics.dtw_itakura([x, y, dist, max_slope, …]) Dynamic Time Warping distance with Itakura parallelogram constraint.
metrics.dtw_multiscale(x, y[, dist, …]) Multiscale Dynamic Time Warping distance.
metrics.dtw_fast(x, y[, dist, radius, …]) Fast Dynamic Time Warping distance.
metrics.itakura_parallelogram(n_timestamps_1) Compute the Itakura parallelogram.
metrics.sakoe_chiba_band(n_timestamps_1[, …]) Compute the Sakoe-Chiba band.
metrics.show_options([method, disp]) Show documentation for additional options of DTW methods.

pyts.multivariate: Multivariate time series tools

The pyts.multivariate module includes tools to deal for multivariate time series.


multivariate.classification.MultivariateClassifier(…) Classifier for multivariate time series.


multivariate.image.JointRecurrencePlot([…]) Joint Recurrence Plot.


multivariate.transformation.MultivariateTransformer(…) Transformer for multivariate time series.
multivariate.transformation.WEASELMUSE([…]) WEASEL+MUSE algorithm.


multivariate.utils.check_3d_array(X) Check that the input is a three-dimensional array.

pyts.preprocessing: Preprocessing tools

The pyts.preprocessing module includes preprocessing algorithms.


preprocessing.StandardScaler([with_mean, …]) Standardize time series by removing mean and scaling to unit variance.
preprocessing.MinMaxScaler([sample_range]) Transforms samples by scaling each sample to a given range.
preprocessing.MaxAbsScaler() Scale each sample by its maximum absolute value.
preprocessing.RobustScaler([with_centering, …]) Scale samples using statistics that are robust to outliers.


preprocessing.PowerTransformer([method, …]) Apply a power transform sample-wise to make data more Gaussian-like.
preprocessing.QuantileTransformer([…]) Transform samples using quantiles information.


preprocessing.KBinsDiscretizer([n_bins, …]) Bin continuous data into intervals sample-wise.


preprocessing.InterpolationImputer([…]) Impute missing values using interpolation.

pyts.transformation: Transformation algorithms

The pyts.transformation module includes transformation algorithms.

transformation.BOSS([word_size, n_bins, …]) Bag of Symbolic Fourier Approximation Symbols.
transformation.ShapeletTransform([…]) Shapelet Transform Algorithm.
transformation.WEASEL([word_size, n_bins, …]) Word ExtrAction for time SEries cLassification.

pyts.utils: Utility tools

The pyts.utils module includes utility tools.

utils.segmentation(ts_size, window_size[, …]) Compute the indices for Piecewise Agrgegate Approximation.
utils.windowed_view(X, window_size[, …]) Return a windowed view of a 2D array.