{
"info": {
"author": "Richard O'Dwyer",
"author_email": "richard@richard.do",
"bugtrack_url": null,
"classifiers": [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: C",
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
"Topic :: Software Development"
],
"description": ".. -*- mode: rst -*-\n\nsoft-DTW\n=========\n\nPython implementation of soft-DTW.\n\nWhat is it?\n-----------\n\nThe celebrated dynamic time warping (DTW) [1] defines the discrepancy between\ntwo time series, of possibly variable length, as their minimal alignment cost.\nAlthough the number of possible alignments is exponential in the length of the\ntwo time series, [1] showed that DTW can be computed in only quadractic time\nusing dynamic programming.\n\nSoft-DTW [2] proposes to replace this minimum by a soft minimum. Like the\noriginal DTW, soft-DTW can be computed in quadratic time using dynamic\nprogramming. However, the main advantage of soft-DTW stems from the fact that\nit is differentiable everywhere and that its gradient can also be computed in\nquadratic time. This enables to use soft-DTW for time series averaging or as a\nloss function, between a ground-truth time series and a time series predicted\nby a neural network, trained end-to-end using backpropagation.\n\nSupported features\n------------------\n\n* soft-DTW (forward pass) and gradient (backward pass) computations,\n implemented in Cython for speed\n* barycenters (time series averaging)\n* dataset loader for the `UCR archive `_\n* `Chainer `_ function\n\nPlanned features\n-----------------\n\n* PyTorch function\n\nExample\n--------\n\n.. code-block:: python\n\n from sdtw import SoftDTW\n from sdtw.distance import SquaredEuclidean\n\n # Time series 1: numpy array, shape = [m, d] where m = length and d = dim\n X = ...\n # Time series 2: numpy array, shape = [n, d] where n = length and d = dim\n Y = ...\n\n # D can also be an arbitrary distance matrix: numpy array, shape [m, n]\n D = SquaredEuclidean(X, Y)\n sdtw = SoftDTW(D, gamma=1.0)\n # soft-DTW discrepancy, approaches DTW as gamma -> 0\n value = sdtw.compute()\n # gradient w.r.t. D, shape = [m, n], which is also the expected alignment matrix\n E = sdtw.grad()\n # gradient w.r.t. X, shape = [m, d]\n G = D.jacobian_product(E)\n\nInstallation\n------------\n\nBinary packages are not available.\n\nThis project can be installed from its git repository. It is assumed that you\nhave a working C compiler.\n\n1. Obtain the sources by::\n\n git clone https://github.com/mblondel/soft-dtw.git\n\nor, if `git` is unavailable, `download as a ZIP from GitHub `_.\n\n\n2. Install the dependencies::\n\n # via pip\n\n pip install numpy scipy scikit-learn cython nose\n\n\n # via conda\n\n conda install numpy scipy scikit-learn cython nose\n\n\n3. Build and install soft-dtw::\n\n cd soft-dtw\n python setup.py install\n\n\nReferences\n----------\n\n.. [1] Hiroaki Sakoe, Seibi Chiba.\n *Dynamic programming algorithm optimization for spoken word recognition.*\n In: IEEE Trans. on Acoustics, Speech, and Sig. Proc, 1978.\n\n.. [2] Marco Cuturi, Mathieu Blondel.\n *Soft-DTW: a Differentiable Loss Function for Time-Series.*\n In: Proc. of ICML 2017.\n [`PDF `_]\n\nAuthor\n------\n\n- Mathieu Blondel, 2017\n",
"description_content_type": "",
"docs_url": null,
"download_url": "https://github.com/mblondel/soft-dtw/",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/mblondel/soft-dtw/",
"keywords": "",
"license": "Simplified BSD",
"maintainer": "",
"maintainer_email": "",
"name": "soft-dtw",
"package_url": "https://pypi.org/project/soft-dtw/",
"platform": "",
"project_url": "https://pypi.org/project/soft-dtw/",
"project_urls": {
"Download": "https://github.com/mblondel/soft-dtw/",
"Homepage": "https://github.com/mblondel/soft-dtw/"
},
"release_url": "https://pypi.org/project/soft-dtw/0.1.6/",
"requires_dist": null,
"requires_python": "",
"summary": "Python implementation of soft-DTW",
"version": "0.1.6"
},
"last_serial": 3868595,
"releases": {
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "0a8faaac1e27b501abf7f977dbf75ee6",
"sha256": "2ea2cfd07b961fd27e5d88b64b71108cde2526fc2ef9843fb899224123e8dd56"
},
"downloads": -1,
"filename": "soft-dtw-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "0a8faaac1e27b501abf7f977dbf75ee6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7732,
"upload_time": "2018-05-16T10:02:52",
"url": "https://files.pythonhosted.org/packages/0d/77/98818372f5628693535b3a1ce6ac1c52bc0db78bc9b72544cd2a28aad66c/soft-dtw-0.1.0.tar.gz"
}
],
"0.1.6": [
{
"comment_text": "",
"digests": {
"md5": "458e0e76bca6f9306b82f486b41e8a97",
"sha256": "75092414fbdc31fe4c82e560aee4b4c5bd4993275e7934dea5dd24a461473f12"
},
"downloads": -1,
"filename": "soft_dtw-0.1.6-cp36-cp36m-macosx_10_13_x86_64.whl",
"has_sig": false,
"md5_digest": "458e0e76bca6f9306b82f486b41e8a97",
"packagetype": "bdist_wheel",
"python_version": "3.6",
"requires_python": null,
"size": 29299,
"upload_time": "2018-05-16T13:10:54",
"url": "https://files.pythonhosted.org/packages/26/e9/98305d8a5b37d4e0754cbdc42c9678582ca21d0838dc5efaa1c07cce82a6/soft_dtw-0.1.6-cp36-cp36m-macosx_10_13_x86_64.whl"
},
{
"comment_text": "",
"digests": {
"md5": "d3773eecc33cbd537c5a38ec48ea72d1",
"sha256": "60498ee2049a6a0b49276d26deca8abfa007a9ac9c51afbaecfb1fa403806da8"
},
"downloads": -1,
"filename": "soft-dtw-0.1.6.tar.gz",
"has_sig": false,
"md5_digest": "d3773eecc33cbd537c5a38ec48ea72d1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 58060,
"upload_time": "2018-05-16T13:10:25",
"url": "https://files.pythonhosted.org/packages/ec/a8/99a1c684116c73dee995ed690a1ed9217ae0eb9514c0b06fdd386c7c21da/soft-dtw-0.1.6.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "458e0e76bca6f9306b82f486b41e8a97",
"sha256": "75092414fbdc31fe4c82e560aee4b4c5bd4993275e7934dea5dd24a461473f12"
},
"downloads": -1,
"filename": "soft_dtw-0.1.6-cp36-cp36m-macosx_10_13_x86_64.whl",
"has_sig": false,
"md5_digest": "458e0e76bca6f9306b82f486b41e8a97",
"packagetype": "bdist_wheel",
"python_version": "3.6",
"requires_python": null,
"size": 29299,
"upload_time": "2018-05-16T13:10:54",
"url": "https://files.pythonhosted.org/packages/26/e9/98305d8a5b37d4e0754cbdc42c9678582ca21d0838dc5efaa1c07cce82a6/soft_dtw-0.1.6-cp36-cp36m-macosx_10_13_x86_64.whl"
},
{
"comment_text": "",
"digests": {
"md5": "d3773eecc33cbd537c5a38ec48ea72d1",
"sha256": "60498ee2049a6a0b49276d26deca8abfa007a9ac9c51afbaecfb1fa403806da8"
},
"downloads": -1,
"filename": "soft-dtw-0.1.6.tar.gz",
"has_sig": false,
"md5_digest": "d3773eecc33cbd537c5a38ec48ea72d1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 58060,
"upload_time": "2018-05-16T13:10:25",
"url": "https://files.pythonhosted.org/packages/ec/a8/99a1c684116c73dee995ed690a1ed9217ae0eb9514c0b06fdd386c7c21da/soft-dtw-0.1.6.tar.gz"
}
]
}