dtaidistance.dtw_visualisation

Dynamic Time Warping (DTW) visualisations.

author:Wannes Meert
copyright:Copyright 2017 KU Leuven, DTAI Research Group.
license:Apache License, Version 2.0, see LICENSE for details.
dtaidistance.dtw_visualisation.plot_warp(from_s, to_s, new_s, path, filename=None)

Plot the warped sequence and its relation to the original sequence and the target sequence.

Parameters:
  • from_s – From sequence.
  • to_s – To sequence.
  • new_s – Warped version of from sequence.
  • path – Optimal warping path.
  • filename – Filename path (optional).
dtaidistance.dtw_visualisation.plot_warping(s1, s2, path, filename=None)

Plot the optimal warping between to sequences.

Parameters:
  • s1 – From sequence.
  • s2 – To sequence.
  • path – Optimal warping path.
  • filename – Filename path (optional).
dtaidistance.dtw_visualisation.plot_warpingpaths(s1, s2, paths, path=None, filename=None, shownumbers=False)

Plot the warping paths matrix.

Parameters:
  • s1 – Series 1
  • s2 – Series 2
  • paths – Warping paths matrix
  • path – Path to draw (typically this is the best path)
  • filename – Filename for the image (optional)
  • shownumbers – Show distances also as numbers