{ "info": { "author": "Georg Unterholzner", "author_email": "georg.unterholzner.coding@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Scientific/Engineering :: Information Analysis" ], "description": "# kneebow\n\nFind the knee of a curve or the elbow of a curve.\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/3baba89ac29b4a96bd990148deb36236)](https://www.codacy.com/app/georg-un/kneebow?utm_source=github.com&utm_medium=referral&utm_content=georg-un/kneebow&utm_campaign=Badge_Grade)\n[![Build Status](https://travis-ci.org/georg-un/kneebow.svg?branch=master)](https://travis-ci.org/georg-un/kneebow)\n[![codecov](https://codecov.io/gh/georg-un/kneebow/branch/master/graph/badge.svg)](https://codecov.io/gh/georg-un/kneebow)\n\n## How it works\n\nkneebow builds upon a very simple idea: if we want to find the elbow of a curve, we can simply rotate the data so that curve looks down and then take the minimum value. If we want to find the knee of the curve, we take the maximum value instead. It's as simple as that.\n\n## Installation\n\nYou can install the package via pip:\n\n```sh\npip install kneebow\n```\n\nAlternatively, you can also install the latest version from GitHub:\n\n```sh\npip install git+https://github.com/georg-un/kneebow.git\n```\n\n## Usage\n\nLet's assume, we try to find the elbow of the following data:\n\n```python\nimport numpy as np\ndata = np.array([[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], # linear until (8,8)\n [9, 16], [10, 32], [11, 64], [12, 128], [13, 256], [14, 512]]) # exponential afterwards\n```\nLet's have a peak how this data looks like:\n\n![data_plot](https://raw.githubusercontent.com/georg-un/kneebow/master/assets/data_plot.png)\n\nTo find the elbow, we create an instance of the `Rotor` class and use its `fit_rotate` method:\n\n```python\nfrom kneebow.rotor import Rotor\n \nrotor = Rotor()\nrotor.fit_rotate(data)\n```\nNow we can get the index of the elbow as follows:\n```python\nelbow_idx = rotor.get_elbow_index()\nprint(elbow_idx) # 11\n```\nThe `Rotor` class also comes with plot methods to inspect the data visually together with the estimated elbow/knee:\n```python\nrotor.plot_elbow()\n```\n![rotor_plot](https://raw.githubusercontent.com/georg-un/kneebow/master/assets/rotor_plot.png)\n\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/georg-un/kneebow/archive/v0.1.1.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/georg-un/kneebow", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "kneebow", "package_url": "https://pypi.org/project/kneebow/", "platform": "", "project_url": "https://pypi.org/project/kneebow/", "project_urls": { "Download": "https://github.com/georg-un/kneebow/archive/v0.1.1.tar.gz", "Homepage": "https://github.com/georg-un/kneebow" }, "release_url": "https://pypi.org/project/kneebow/0.1.1/", "requires_dist": null, "requires_python": ">=3.4", "summary": "Knee or elbow detection for curves", "version": "0.1.1" }, "last_serial": 5658020, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "92d0fa762307987b7f058d3a973289a0", "sha256": "25b30fffe5f9b71a29650857bb2e79ae07da8a3e7bceab406fe7fceef12f5ae2" }, "downloads": -1, "filename": "kneebow-0.1.0.tar.gz", "has_sig": false, "md5_digest": "92d0fa762307987b7f058d3a973289a0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 3083, "upload_time": "2019-08-09T22:36:38", "url": "https://files.pythonhosted.org/packages/05/67/121c877147f47e0b5fc65dc9e9b1d06898a7e08f34445d030d0bc7b12181/kneebow-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c10bfd142103070532686deb2ea44980", "sha256": "625fc9c5d7ceb7b22282a44fefea693069d3238cf8a3d29efa8de1a77fac502b" }, "downloads": -1, "filename": "kneebow-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c10bfd142103070532686deb2ea44980", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 3369, "upload_time": "2019-08-09T22:45:42", "url": "https://files.pythonhosted.org/packages/0b/13/5be17749721e7f9a7275f6fcaa71f26b2552d5655c9779f72fed62a55088/kneebow-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c10bfd142103070532686deb2ea44980", "sha256": "625fc9c5d7ceb7b22282a44fefea693069d3238cf8a3d29efa8de1a77fac502b" }, "downloads": -1, "filename": "kneebow-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c10bfd142103070532686deb2ea44980", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 3369, "upload_time": "2019-08-09T22:45:42", "url": "https://files.pythonhosted.org/packages/0b/13/5be17749721e7f9a7275f6fcaa71f26b2552d5655c9779f72fed62a55088/kneebow-0.1.1.tar.gz" } ] }