knee

(Multi)Knee/Elbow point detection library

https://github.com/mariolpantunes/knee

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.4%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

(Multi)Knee/Elbow point detection library

Basic Info
  • Host: GitHub
  • Owner: mariolpantunes
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 3.55 MB
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 5
  • Open Issues: 0
  • Releases: 0
Created over 5 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

Kneeliverse: A Universal Knee/ElbowDetection Library for Performance Curves

Estimating the knee/elbow point in performance curves is a challenging task. However, most of the time these points represent ideal compromises between cost and performance.

This library implements several well-known knee detection algorithms: 1. Discrete Curvature 2. DFDT 3. Kneedle 4. L-method 5. Menger curvature

Furthermore, the code in this library expands the ideas on these algorithms to detect multi-knee/elbow points in complex curves. We implemented a recursive method that allows each of the previously mentioned methods to detect multi-knee and elbow points. Some methods natively support multi-knee detection, such as: 1. Kneedle 2. Fusion 3. Z-method

Finally, we also implemented additional methods that help with knee detection tasks. As a preprocessing step, we develop a custom RDP algorithm that reduced a discrete set of points while keeping the reconstruction error to a minimum. As a post-processing step we implemented several algorithms: 1. 1D dimensional clustering, is used to merge close knee points 2. Several filters out non-relevant knees 3. Knee ranking algorithms that used several criteria to assess the quality of a knee point

Running unit tests

Several unit tests were written to validate some corner cases. The unit tests were written in unittest. Run the following commands to execute the unit tests.

bash python3 -m venv venv source venv/bin/activate python -m pip install --upgrade pip pip install . python -m unittest

Documentation

This library was documented using the google style docstring, it can be accessed here. Run the following commands to produce the documentation for this library.

bash python3 -m venv venv source venv/bin/activate pip install pdoc pdoc --math -d google -o docs src/kneeliverse \ --logo https://raw.githubusercontent.com/mariolpantunes/knee/main/media/knee.png \ --favicon https://raw.githubusercontent.com/mariolpantunes/knee/main/media/knee.png

Instalation

To install the library locally, simple execute the following commands:

bash python3 -m venv venv source venv/bin/activate python -m pip install --upgrade pip pip install . You can also use the PyPI repository for easy access to the library:

txt kneeliverse>=1.0

Runing the demos

The demos can be execute as python modules using the following code:

bash python -m demos.curvature -i [trace] python -m demos.dfdt -i [trace] python -m demos.fusion -i [trace] python -m demos.kneedle_classic -i [trace] python -m demos.kneedle_rec -i [trace] python -m demos.kneedle -i [trace] python -m demos.lmethod -i [trace] python -m demos.menger -i [trace] python -m demos.zmethod -i [trace] Most demos have the same parameters (with the exception of zmethod and kneedle_classic):

```bash python -m demos.curvature -husage: curvature.py [-h] -i I [-a] [-r R] [-t T] [-c C] [-o] [-g] [-k {left,linear,right,hull}]

Multi Knee evaluation app

optional arguments: -h, --help show this help message and exit -i I input file -a add even spaced points -r R RDP reconstruction threshold -t T clustering threshold -c C corner threshold -o store output (debug) -g display output (debug) -k {left,linear,right,hull} Knee ranking method ```

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright

This project is under the following COPYRIGHT.

Python CI

Owner

  • Name: Mário Antunes
  • Login: mariolpantunes
  • Kind: user
  • Location: Aveiro
  • Company: @ATNoG

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: >-
  Kneeliverse: A Universal Knee/ElbowDetection Library for
  Performance Curves
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Mário
    family-names: Antunes
    email: mario.antunes@ua.pt
    affiliation: Universidade de Aveiro
    orcid: 'https://orcid.org/0000-0002-6504-9441'
  - given-names: Tyler
    email: testro@cs.stonybrook.edu
    family-names: Estro
    affiliation: Stony Brook University
    orcid: 'https://orcid.org/0000-0002-5851-8801'
  - given-names: Pranav
    email: pranav.bhandari@emory.edu
    family-names: Bhandari
    affiliation: Emory University
  - given-names: Anshul
    email: anshul@cs.stonybrook.edu
    family-names: Gandhi
    affiliation: Stony Brook University
    orcid: 'https://orcid.org/0000-0002-2351-6523'
  - given-names: Geoff
    email: geoff@cs.hmc.edu
    family-names: Kuenning
    affiliation: Harvey Mudd College
    orcid: 'https://orcid.org/0000-0002-3882-2072'
  - given-names: Yifei
    email: yifeliu@cs.stonybrook.edu
    family-names: Liu
    affiliation: Stony Brook University
    orcid: 'https://orcid.org/0000-0002-1918-5119'
  - given-names: Carl
    email: carl@waldspurger.org
    family-names: Waldspurger
    affiliation: Carl Waldspurger Consulting
    orcid: 'https://orcid.org/0009-0002-3587-3058'
  - given-names: Avani
    email: avani@mathcs.emory.edu
    family-names: Wildani
    affiliation: Emory University
    orcid: 'https://orcid.org/0000-0001-9457-8863'
  - given-names: Erez
    email: ezk@cs.stonybrook.edu
    family-names: Zadok
    affiliation: Stony Brook University
    orcid: 'https://orcid.org/0000-0001-5248-9184'
identifiers:
  - type: doi
    value: 10.5281/zenodo.11089667
repository-code: 'https://github.com/mariolpantunes/knee'
url: 'https://pypi.org/project/kneeliverse/'
license: MIT
version: '1.0'
date-released: '2024-05-01'

GitHub Events

Total
  • Watch event: 1
  • Push event: 6
  • Fork event: 1
Last Year
  • Watch event: 1
  • Push event: 6
  • Fork event: 1

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 322
  • Total Committers: 1
  • Avg Commits per committer: 322.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 11
  • Committers: 1
  • Avg Commits per committer: 11.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Mario Antunes m****s@g****m 322

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 19
  • Total pull requests: 0
  • Average time to close issues: 7 days
  • Average time to close pull requests: N/A
  • Total issue authors: 3
  • Total pull request authors: 0
  • Average comments per issue: 0.53
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • mariolpantunes (17)
  • erickalfaro (1)
  • kittenwmitten (1)
Pull Request Authors
Top Labels
Issue Labels
bug (6)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 91 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 3
  • Total maintainers: 1
pypi.org: knee

(Multi)Knee/Elbow point detection library

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 64 Last month
Rankings
Dependent packages count: 10.1%
Downloads: 14.6%
Average: 18.6%
Forks count: 19.1%
Dependent repos count: 21.5%
Stargazers count: 27.8%
Maintainers (1)
Last synced: about 1 year ago
pypi.org: kneeliverse

Kneeliverse: A Universal Knee/ElbowDetection Library for Performance Curves

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 27 Last month
Rankings
Dependent packages count: 9.5%
Average: 36.0%
Dependent repos count: 62.5%
Maintainers (1)
Last synced: 7 months ago

Dependencies

.github/workflows/main.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
requirements.txt pypi
  • exectime main
  • matplotlib >=3.5.1
  • numpy >=1.21.3
  • tqdm >=4.63.0
  • uts main
.github/workflows/publish.yml actions
  • actions/checkout v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
pyproject.toml pypi