{ "info": { "author": "Shay Palachy", "author_email": "shaypal5@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "ssdts_matching\n##############\n|PyPI-Status| |PyPI-Versions| |Build-Status| |Codecov| |LICENCE|\n\nFast optimal matching of items for source-sharing derivative time series.\n\n.. code-block:: python\n\n from ssdts_matching import dynamic_timestamp_match\n dynamic_timestamp_match(timestamp1, timestamps2, delta=20)\n\n.. contents::\n\n.. section-numbering::\n\nInstallation\n============\n\nInstall ``ssdts_matching`` with:\n\n.. code-block:: bash\n\n pip install ssdts_matching\n\n\nFeatures\n========\n\n* Pure Python.\n* Compatible with Python 3.5+.\n* Dependencies:\n\n * numpy\n * `sortedcontainers `_\n\n\nUse\n===\n\nYou can get a matching of two timestamp series with\n\n.. code-block:: python\n\n from ssdts_matching import dynamic_timestamp_match\n dynamic_timestamp_match(timestamp1, timestamps2, delta=20)\n\n\nSix different functions, in an increasing level of complexity, are procided:\n\n\npopping_greedy_timestamp_match\n------------------------------\n\nTries to match two timestamp series in a greedy fashion. Timestamps are popped from their lists as they are matched.\n\nRuns in ``O(M*log(N))`` where ``M=len(timestamps1)`` and ``M=len(timestamps2)``. Not guarenteed to find an optimal matching error-wise, where the error is the sum of differences between matched pairs.\n\n\ngreedy_timestamp_match\n----------------------\n\nTries to match two timestamp series in a greedy fashion.\n\nRuns in ``O(M*log(N))`` where ``M=len(timestamps1)`` and ``M=len(timestamps2)``. If the resulting match is an injective function from the first series to the second one then the solution is optimal error-wise, where the error is the sum of differences between matched pairs. Otherwise, it is not.\n\n\ndynamic_timestamp_match\n-----------------------\n\nOptimally matches two timestamp series using dynamic programming.\n\nRuns in ``O(M*N)``, where ``M=len(timestamps1)`` and ``N=len(timestamps2)``. Guarentees an optimal solution error-wise, where the error is the sum of differences between matched pairs.\n\n\nhybrid_timestamp_match\n----------------------\n\nFinds the optimal matching of two timestamps series using both a greedy algorithm and a dynamic one.\n\nRuns in ``O(M*N)``, where ``M=len(timestamps1)`` and ``N=len(timestamps2)``, but has a better average running time than ``dynamic_timestamp_match`` if some inputs can be optimally solved with the greedy algorithm. Guarentees an optimal solution error-wise, where the error is the sum of differences between matched pairs.\n\n\nvertical_aligned_timestamp_match\n--------------------------------\n\nMatches two timestamps series by partioning them by verticals (pairs of timestamps from both series with identical values) and matching each partition using the hybrid approach.\n\nRuns in O(M*N), where ``M=len(timestamps1)`` and ``N=len(timestamps2)``. Does not guarentee an optimal solution error-wise, where the error is the sum of differences between matched pairs.\n\n\ndelta_partitioned_timestamp_match\n---------------------------------\n\nttempts to match the two given series of timestamps by partioning the first series into ``2 * delta``-separated buckets, and applying the given matching function to each (any of the above functions can be used), combining the sub-solution into a matching.\n\nIf the provided matching function yields optimal matchings, than so is the matching provided by this function. The algorithm is not guarenteed to be symmetric; giving the same two series in the opposite order may yield a different matching.\n\n\nContributing\n============\n\nPackage author and current maintainer is Shay Palachy (shay.palachy@gmail.com); You are more than welcome to approach him for help. Contributions are very welcomed.\n\nInstalling for development\n--------------------------\n\nClone:\n\n.. code-block:: bash\n\n git clone git@github.com:shaypal5/ssdts_matching.git\n\n\nInstall in development mode with test dependencies:\n\n.. code-block:: bash\n\n cd ssdts_matching\n pip install -e \".[test]\"\n\n\nRunning the tests\n-----------------\n\nTo run the tests, use:\n\n.. code-block:: bash\n\n python -m pytest --cov=ssdts_matching\n\n\nAdding documentation\n--------------------\n\nThis project is documented using the `numpy docstring conventions`_, which were chosen as they are perhaps the most widely-spread conventions that are both supported by common tools such as Sphinx and result in human-readable docstrings (in my personal opinion, of course). When documenting code you add to this project, please follow `these conventions`_.\n\n.. _`numpy docstring conventions`: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt\n.. _`these conventions`: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt\n\n\nCredits\n=======\nCreated by Shay Palachy (shay.palachy@gmail.com).\n\n\n.. |PyPI-Status| image:: https://img.shields.io/pypi/v/ssdts_matching.svg\n :target: https://pypi.python.org/pypi/ssdts_matching\n\n.. |PyPI-Versions| image:: https://img.shields.io/pypi/pyversions/ssdts_matching.svg\n :target: https://pypi.python.org/pypi/ssdts_matching\n\n.. |Build-Status| image:: https://travis-ci.org/shaypal5/ssdts_matching.svg?branch=master\n :target: https://travis-ci.org/shaypal5/ssdts_matching\n\n.. |LICENCE| image:: https://img.shields.io/pypi/l/ssdts_matching.svg\n :target: https://pypi.python.org/pypi/ssdts_matching\n\n.. |Codecov| image:: https://codecov.io/github/shaypal5/ssdts_matching/coverage.svg?branch=master\n :target: https://codecov.io/github/shaypal5/ssdts_matching?branch=master\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/shaypal5/ssdts_matching", "keywords": "pandas dataframe pipeline data", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ssdts_matching", "package_url": "https://pypi.org/project/ssdts_matching/", "platform": "any", "project_url": "https://pypi.org/project/ssdts_matching/", "project_urls": { "Homepage": "https://github.com/shaypal5/ssdts_matching" }, "release_url": "https://pypi.org/project/ssdts_matching/0.0.3/", "requires_dist": null, "requires_python": "", "summary": "Fast matching of source-sharing derivative time series.", "version": "0.0.3" }, "last_serial": 3665651, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "2ad945f9f570f87684e6fb2a66852dfe", "sha256": "9b93a3e9a3e0ee4a02fd8355e1b6fc6a8a2ae85f7625c18c7cf2ad771fa001bc" }, "downloads": -1, "filename": "ssdts_matching-0.0.2.tar.gz", "has_sig": false, "md5_digest": "2ad945f9f570f87684e6fb2a66852dfe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21261, "upload_time": "2017-11-09T11:11:57", "url": "https://files.pythonhosted.org/packages/4a/59/11f816beae88e303b7d1dbb11318b556602a98d21322e424c03ec9b763c2/ssdts_matching-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "bef7eb99830ecb1633089d55c6331386", "sha256": "b642f736ed33247161ccc4a04796ae47e8deb518cadc65008bd7ebcc31427c83" }, "downloads": -1, "filename": "ssdts_matching-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bef7eb99830ecb1633089d55c6331386", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 9537, "upload_time": "2018-03-13T15:30:38", "url": "https://files.pythonhosted.org/packages/23/bd/d589eb92930a0572947010e6bbe79e30bded893f69f3b9a40386fe33175c/ssdts_matching-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "48c37bf422044dfae962b29ebe5cba91", "sha256": "0f3d38b49664a97157169e06caafad36175cb0ef145e39cbfc75e542a6f7778d" }, "downloads": -1, "filename": "ssdts_matching-0.0.3.tar.gz", "has_sig": false, "md5_digest": "48c37bf422044dfae962b29ebe5cba91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22189, "upload_time": "2018-03-13T15:30:37", "url": "https://files.pythonhosted.org/packages/d1/2a/9062c92bae959d1fac609360788ad39105a9cca831298c22d35befec9ef5/ssdts_matching-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bef7eb99830ecb1633089d55c6331386", "sha256": "b642f736ed33247161ccc4a04796ae47e8deb518cadc65008bd7ebcc31427c83" }, "downloads": -1, "filename": "ssdts_matching-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bef7eb99830ecb1633089d55c6331386", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 9537, "upload_time": "2018-03-13T15:30:38", "url": "https://files.pythonhosted.org/packages/23/bd/d589eb92930a0572947010e6bbe79e30bded893f69f3b9a40386fe33175c/ssdts_matching-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "48c37bf422044dfae962b29ebe5cba91", "sha256": "0f3d38b49664a97157169e06caafad36175cb0ef145e39cbfc75e542a6f7778d" }, "downloads": -1, "filename": "ssdts_matching-0.0.3.tar.gz", "has_sig": false, "md5_digest": "48c37bf422044dfae962b29ebe5cba91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22189, "upload_time": "2018-03-13T15:30:37", "url": "https://files.pythonhosted.org/packages/d1/2a/9062c92bae959d1fac609360788ad39105a9cca831298c22d35befec9ef5/ssdts_matching-0.0.3.tar.gz" } ] }