{ "info": { "author": "Charles Jekel", "author_email": "cjekel@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "similaritymeasures\n==================\n\n|Downloads a month| |Build Status| |Coverage Status|\n\nQuantify the difference between two arbitrary curves\n====================================================\n\nCurves in this case are: - discretized by inidviudal data points -\nordered from a beginning to an ending\n\nConsider the following two curves. We want to quantify how different the\nNumerical curve is from the Experimental curve. Notice how there are no\nconcurrent Stress or Strain values in the two curves. Additionally one\ncurve has more data points than the other curves.\n\n.. figure:: https://raw.githubusercontent.com/cjekel/similarity_measures/master/images/TwoCurves.png\n :alt: Image of two different curves\n\n Image of two different curves\n\nIn the ideal case the Numerical curve would match the Experimental curve\nexactly. This means that the two curves would appear directly on top of\neach other. Our measures of similarity would return a *zero* distance\nbetween two curves that were on top of each other.\n\nMethods covered\n===============\n\nThis library includes the following methods to quantify the difference\n(or similarity) between two curves:\n\n- **Partial Curve Mapping**\\ x (PCM) method: Matches the area of a\n subset between the two curves [1]\n- **Area method**\\ x: An algorithm for calculating the Area between two\n curves in 2D space [2]\n- **Discrete Fr\u00e9chet distance**\\ y: The shortest distance in-between\n two curves, where you are allowed to very the speed at which you\n travel along each curve independently (walking dog problem) [3, 4, 5,\n 6, 7, 8]\n- **Curve Length**\\ x method: Assumes that the only true independent\n variable of the curves is the arc-length distance along the curve\n from the origin [9, 10]\n- **Dynamic Time Warping**\\ y (DTW): A non-metric distance between two\n time-series curves that has been proven useful for a variety of\n applications [11, 12, 13, 14, 15, 16]\n\nx denotes methods created specifically for material parameter\nidentification\n\ny denotes that the method implemented in this library supports N-D data!\n\nInstallation\n============\n\nInstall with pip\n\n::\n\n [sudo] pip install similaritymeasures\n\nor clone and install from source.\n\n::\n\n git clone https://github.com/cjekel/similarity_measures\n [sudo] pip install ./similarity_measures\n\nExample useage\n==============\n\nThis shows you how to compute the various similarity measures\n\n::\n\n import numpy as np\n import similaritymeasures\n import matplotlib.pyplot as plt\n\n # Generate random experimental data\n x = np.random.random(100)\n y = np.random.random(100)\n exp_data = np.zeros((100, 2))\n exp_data[:, 0] = x\n exp_data[:, 1] = y\n\n # Generate random numerical data\n x = np.random.random(100)\n y = np.random.random(100)\n num_data = np.zeros((100, 2))\n num_data[:, 0] = x\n num_data[:, 1] = y\n\n # quantify the difference between the two curves using PCM\n pcm = similaritymeasures.pcm(exp_data, num_data)\n\n # quantify the difference between the two curves using\n # Discrete Frechet distance\n df = similaritymeasures.frechet_dist(exp_data, num_data)\n\n # quantify the difference between the two curves using\n # area between two curves\n area = similaritymeasures.area_between_two_curves(exp_data, num_data)\n\n # quantify the difference between the two curves using\n # Curve Length based similarity measure\n cl = similaritymeasures.curve_length_measure(exp_data, num_data)\n\n # quantify the difference between the two curves using\n # Dynamic Time Warping distance\n dtw, d = similaritymeasures.dtw(exp_data, num_data)\n\n # print the results\n print(pcm, df, area, cl, dtw)\n\n # plot the data\n plt.figure()\n plt.plot(exp_data[:, 0], exp_data[:, 1])\n plt.plot(num_data[:, 0], num_data[:, 1])\n plt.show()\n\nIf you are interested in setting up an optimization problem using these\nmeasures, check out `this Jupyter\nNotebook `__\nwhich replicates Section 3.2 from [2].\n\nChangelog\n=========\n\nVersion 0.3.0: Fr\u00e9chet distance now supports N-D data! See\n`CHANGELOG.md `__\nfor full details.\n\nReferences\n==========\n\n[1] Katharina Witowski and Nielen Stander. Parameter Identification of\nHysteretic Models Using Partial Curve Mapping. 12th AIAA Aviation\nTechnology, Integration, and Op- erations (ATIO) Conference and 14th\nAIAA/ISSMO Multidisciplinary Analysis and Optimization Conference, sep\n2012. doi: doi:10.2514/6.2012-5580.\n\n[2] Jekel, C. F., Venter, G., Venter, M. P., Stander, N., & Haftka, R.\nT. (2018). Similarity measures for identifying material parameters from\nhysteresis loops using inverse analysis. International Journal of\nMaterial Forming. https://doi.org/10.1007/s12289-018-1421-8\n\n[3] M Maurice Fr\u00e9chet. Sur quelques points du calcul fonctionnel.\nRendiconti del Circol Matematico di Palermo (1884-1940), 22(1):1\u201372,\n1906.\n\n[4] Thomas Eiter and Heikki Mannila. Computing discrete Fr\u00e9chet\ndistance. Technical report, 1994.\n\n[5] Anne Driemel, Sariel Har-Peled, and Carola Wenk. Approximating the\nFr\u00e9chet Distance for Realistic Curves in Near Linear Time. Discrete &\nComputational Geometry, 48(1): 94\u2013127, 2012. ISSN 1432-0444. doi:\n10.1007/s00454-012-9402-z. URL\nhttp://dx.doi.org/10.1007/s00454-012-9402-z.\n\n[6] K Bringmann. Why Walking the Dog Takes Time: Frechet Distance Has No\nStrongly Subquadratic Algorithms Unless SETH Fails, 2014.\n\n[7] Sean L Seyler, Avishek Kumar, M F Thorpe, and Oliver Beckstein. Path\nSimilarity Analysis: A Method for Quantifying Macromolecular Pathways.\nPLOS Computational Biology, 11(10):1\u201337, 2015. doi:\n10.1371/journal.pcbi.1004568. URL\nhttps://doi.org/10.1371/journal.pcbi.1004568.\n\n[8] Helmut Alt and Michael Godau. Computing the Fr\u00e9chet Distance Between\nTwo Polyg- onal Curves. International Journal of Computational Geometry\n& Applications, 05 (01n02):75\u201391, 1995. doi: 10.1142/S0218195995000064.\n\n[9] A Andrade-Campos, R De-Carvalho, and R A F Valente. Novel criteria\nfor determina- tion of material model parameters. International Journal\nof Mechanical Sciences, 54 (1):294\u2013305, 2012. ISSN 0020-7403. doi:\nhttps://doi.org/10.1016/j.ijmecsci.2011.11.010. URL\nhttp://www.sciencedirect.com/science/article/pii/S0020740311002451.\n\n[10] J Cao and J Lin. A study on formulation of objective functions for\ndetermin- ing material models. International Journal of Mechanical\nSciences, 50(2):193\u2013204, 2008. ISSN 0020-7403. doi:\nhttps://doi.org/10.1016/j.ijmecsci.2007.07.003. URL\nhttp://www.sciencedirect.com/science/article/pii/S0020740307001178.\n\n[11] Donald J Berndt and James Clifford. Using Dynamic Time Warping to\nFind Pat- terns in Time Series. In Proceedings of the 3rd International\nConference on Knowledge Discovery and Data Mining, AAAIWS\u201994, pages\n359\u2013370. AAAI Press, 1994. URL\nhttp://dl.acm.org/citation.cfm?id=3000850.3000887.\n\n[12] Fran\u00e7ois Petitjean, Alain Ketterlin, and Pierre Gan\u00e7arski. A global\naveraging method for dynamic time warping, with applications to\nclustering. Pattern Recognition, 44 (3):678\u2013693, 2011. ISSN 0031-3203.\ndoi: https://doi.org/10.1016/j.patcog.2010.09.013. URL\nhttp://www.sciencedirect.com/science/article/pii/S003132031000453X.\n\n[13] Toni Giorgino. Computing and Visualizing Dynamic Time Warping\nAlignments in R: The dtw Package. Journal of Statistical Software; Vol\n1, Issue 7 (2009), aug 2009. URL\nhttp://dx.doi.org/10.18637/jss.v031.i07.\n\n[14] Stan Salvador and Philip Chan. Toward Accurate Dynamic Time Warping\nin Linear Time and Space. Intell. Data Anal., 11(5):561\u2013580, oct 2007.\nISSN 1088-467X. URL http://dl.acm.org/citation.cfm?id=1367985.1367993.\n\n[15] Paolo Tormene, Toni Giorgino, Silvana Quaglini, and Mario\nStefanelli. Matching incomplete time series with dynamic time warping:\nan algorithm and an applica- tion to post-stroke rehabilitation.\nArtificial Intelligence in Medicine, 45(1):11\u201334, 2009. ISSN 0933-3657.\ndoi: https://doi.org/10.1016/j.artmed.2008.11.007. URL\nhttp://www.sciencedirect.com/science/article/pii/S0933365708001772.\n\n[16] Senin, P., 2008. Dynamic time warping algorithm review. Information\nand Computer Science Department University of Hawaii at Manoa Honolulu,\nUSA, 855, pp.1-23.\nhttp://seninp.github.io/assets/pubs/senin_dtw_litreview_2008.pdf\n\nPlease cite\n===========\n\nIf you\u2019ve found this information or library helpful please cite the\nfollowing paper. You should also cite the papers of any methods that you\nhave used.\n\nJekel, C. F., Venter, G., Venter, M. P., Stander, N., & Haftka, R. T.\n(2018). Similarity measures for identifying material parameters from\nhysteresis loops using inverse analysis. International Journal of\nMaterial Forming. https://doi.org/10.1007/s12289-018-1421-8\n\n::\n\n @article{Jekel2018,\n author = {Jekel, Charles F and Venter, Gerhard and Venter, Martin P and Stander, Nielen and Haftka, Raphael T},\n doi = {10.1007/s12289-018-1421-8},\n issn = {1960-6214},\n journal = {International Journal of Material Forming},\n month = {jul},\n title = {{Similarity measures for identifying material parameters from hysteresis loops using inverse analysis}},\n url = {https://doi.org/10.1007/s12289-018-1421-8},\n year = {2018}\n }\n\n.. |Downloads a month| image:: https://img.shields.io/pypi/dm/similaritymeasures.svg\n.. |Build Status| image:: https://travis-ci.com/cjekel/similarity_measures.svg?branch=master\n :target: https://travis-ci.com/cjekel/similarity_measures\n.. |Coverage Status| image:: https://coveralls.io/repos/github/cjekel/similarity_measures/badge.svg?branch=master\n :target: https://coveralls.io/github/cjekel/similarity_measures?branch=master", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cjekel/similarity_measures", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "similaritymeasures", "package_url": "https://pypi.org/project/similaritymeasures/", "platform": "any", "project_url": "https://pypi.org/project/similaritymeasures/", "project_urls": { "Homepage": "https://github.com/cjekel/similarity_measures" }, "release_url": "https://pypi.org/project/similaritymeasures/0.3.4/", "requires_dist": null, "requires_python": "", "summary": "Quantify the difference between two arbitrary curves in space", "version": "0.3.4" }, "last_serial": 5695435, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "72fcf9147e16f2a75048cc4fc8aa0047", "sha256": "ac001db87d365d4335ba530042cf7f14479ad9d31ad834d8134fd812b4f42e52" }, "downloads": -1, "filename": "similaritymeasures-0.1.0.tar.gz", "has_sig": false, "md5_digest": "72fcf9147e16f2a75048cc4fc8aa0047", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 361727, "upload_time": "2018-07-16T02:22:45", "url": "https://files.pythonhosted.org/packages/24/79/6df9219a9a08bd7a0a11ee728630ae1cafea3117b96b5cb2c8d3cc0e4726/similaritymeasures-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "bebfc80633b30d331ead036e04be5d15", "sha256": "f2ca3aa56bb0d86e85b505806d0d180bc9119f3e46e21f614d2d229e4b349f0a" }, "downloads": -1, "filename": "similaritymeasures-0.1.1.tar.gz", "has_sig": false, "md5_digest": "bebfc80633b30d331ead036e04be5d15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 361776, "upload_time": "2018-07-16T02:32:58", "url": "https://files.pythonhosted.org/packages/20/6e/42286c5c6b1f1805f6c09e86fe15435a15591355b8991809a1b953466527/similaritymeasures-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "20ee8f17553c8716acf8b774c2b4a910", "sha256": "c4a39f610622b0c1f8a420ffb1d92d5e602321e167e90b1e2239723f0359785f" }, "downloads": -1, "filename": "similaritymeasures-0.1.2.tar.gz", "has_sig": false, "md5_digest": "20ee8f17553c8716acf8b774c2b4a910", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 361814, "upload_time": "2018-12-06T18:20:31", "url": "https://files.pythonhosted.org/packages/73/8c/1e7f26f793440f288a0d5542428eb09d9f535e665f9e76f5dab8c056b417/similaritymeasures-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "f6d0185cb9484cc6ba0ffa0bd5841861", "sha256": "102ab940ef1bb3f6dbb825ea01d244ad43cbcd4ac8448aa9781f81a1251d5b9c" }, "downloads": -1, "filename": "similaritymeasures-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f6d0185cb9484cc6ba0ffa0bd5841861", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 392449, "upload_time": "2018-12-08T00:27:03", "url": "https://files.pythonhosted.org/packages/69/bd/e77c20b7c9cbade02cfb0de14555a4111cc7088b5217ff71a19e72808c95/similaritymeasures-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "2841a5659db204bd6a471a5c3cee1b70", "sha256": "97afe45c85dffb92bb1279751f2d7d04f86fe8c26eedaca0530e28d9a3b7cff7" }, "downloads": -1, "filename": "similaritymeasures-0.2.1.tar.gz", "has_sig": false, "md5_digest": "2841a5659db204bd6a471a5c3cee1b70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 394871, "upload_time": "2018-12-09T00:43:11", "url": "https://files.pythonhosted.org/packages/8d/93/65379ca6d97a2ec748da247b181396d473e0344c3b641b89b040487855b8/similaritymeasures-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "a2b88113147897732d194a4e4503d461", "sha256": "494c135cbb97638a586408ca8782bb6b12cc4fcc4cae3e4fad46ddb690c4a17d" }, "downloads": -1, "filename": "similaritymeasures-0.2.2.tar.gz", "has_sig": false, "md5_digest": "a2b88113147897732d194a4e4503d461", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 393891, "upload_time": "2018-12-09T17:44:50", "url": "https://files.pythonhosted.org/packages/fb/e5/c4a2f78322a43571743604025f55691d1c6a95759281ddfb1a2d0d7b4822/similaritymeasures-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "1c1339834d9263e7bf171871f598f378", "sha256": "85214334d4cd7aeaca4dab4ae79efa2e2213ffbfdfe5adc5fb5590c33c6fd84b" }, "downloads": -1, "filename": "similaritymeasures-0.2.3.tar.gz", "has_sig": false, "md5_digest": "1c1339834d9263e7bf171871f598f378", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 395024, "upload_time": "2018-12-10T15:46:20", "url": "https://files.pythonhosted.org/packages/eb/43/6a2490996bdb7425c03a37ff2543ead8b8a899c08c54b49cfacf9d8b5acd/similaritymeasures-0.2.3.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "41b4854b7a31b7dbace81768ae9af00b", "sha256": "08a0de04df812ef72df7e49090e918c867b54502ea41affeb504a879d431664e" }, "downloads": -1, "filename": "similaritymeasures-0.3.0.tar.gz", "has_sig": false, "md5_digest": "41b4854b7a31b7dbace81768ae9af00b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 395359, "upload_time": "2019-02-08T01:03:45", "url": "https://files.pythonhosted.org/packages/82/9e/558001c8572335f8b83799d0e646dd4d4a99c8b9a79cdb8ba63e75960f53/similaritymeasures-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "27a25b7e760856d0f32f6685c5f9a091", "sha256": "1f925d7e789c60723ff2ea8096e18c877742ba3875ef81caac36890aec1226fd" }, "downloads": -1, "filename": "similaritymeasures-0.3.1.tar.gz", "has_sig": false, "md5_digest": "27a25b7e760856d0f32f6685c5f9a091", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 394079, "upload_time": "2019-08-08T12:44:47", "url": "https://files.pythonhosted.org/packages/ba/92/47ff5e5b9ba408c98acae0d0fa93b0267a8aac20b877da5b43ee6f51df1e/similaritymeasures-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "b41b7b0a988b8b7119093c7a8f631107", "sha256": "813972a7723976b73ffa5082450b7de17115c1d152e53c13adbce32f4d917ccf" }, "downloads": -1, "filename": "similaritymeasures-0.3.2.tar.gz", "has_sig": false, "md5_digest": "b41b7b0a988b8b7119093c7a8f631107", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 394082, "upload_time": "2019-08-14T23:11:22", "url": "https://files.pythonhosted.org/packages/8f/6d/7e00bababb358a29cf253ab0596882060d0705540f7b2913dc6f857c7862/similaritymeasures-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "5876cd770c44ac07b05f8a606c9809bc", "sha256": "755124b429793928fe06f295487c716f3b80fe015f028fc4d1ceff07daaab353" }, "downloads": -1, "filename": "similaritymeasures-0.3.3.tar.gz", "has_sig": false, "md5_digest": "5876cd770c44ac07b05f8a606c9809bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 394014, "upload_time": "2019-08-14T23:18:31", "url": "https://files.pythonhosted.org/packages/33/74/eb02a707eb77c682eaec88e826825df6c77db5141ae8623d03b1dd32161a/similaritymeasures-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "0d36614c49398596d9dcbd20aa49e7b0", "sha256": "fa64bd841cf1733cb44ff13c8ae80036bef4a2741b070588997ad0a40d952fe7" }, "downloads": -1, "filename": "similaritymeasures-0.3.4.tar.gz", "has_sig": false, "md5_digest": "0d36614c49398596d9dcbd20aa49e7b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 395826, "upload_time": "2019-08-18T18:22:24", "url": "https://files.pythonhosted.org/packages/b7/f9/1a916faf02176fce3750eafd6ff485e0c9f8c503e43458cf819b0c0c6389/similaritymeasures-0.3.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0d36614c49398596d9dcbd20aa49e7b0", "sha256": "fa64bd841cf1733cb44ff13c8ae80036bef4a2741b070588997ad0a40d952fe7" }, "downloads": -1, "filename": "similaritymeasures-0.3.4.tar.gz", "has_sig": false, "md5_digest": "0d36614c49398596d9dcbd20aa49e7b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 395826, "upload_time": "2019-08-18T18:22:24", "url": "https://files.pythonhosted.org/packages/b7/f9/1a916faf02176fce3750eafd6ff485e0c9f8c503e43458cf819b0c0c6389/similaritymeasures-0.3.4.tar.gz" } ] }