GithubHelp home page GithubHelp logo

Unable to detect knee and elbow about kneed HOT 1 CLOSED

arvkevi avatar arvkevi commented on July 19, 2024
Unable to detect knee and elbow

from kneed.

Comments (1)

d-kleine avatar d-kleine commented on July 19, 2024 1

@dpapadop I have just looked into your bug report. As far as I understand, you want to locate both knee and elbow for the given plot. Why do you use df_test['y'] when plotting y_cum? y and y_cum are completely different:
plt.plot(df_test['x'], df_test['y'])
lineplot

How I would solve this issue:

  1. I would first go looking up the knee point:
kneedle = KneeLocator(x=df_test['x'], y=df_test['y_cum'], curve='concave', direction='increasing', online=True, S=1)
knee_point = kneedle.knee
knee_point

This gives me a knee point at x=9

  1. Then I would reduce the sensibility down to zero for finding the elbow, see here:

S is a measure of how many “flat” points we expect to see in the unmodified data curve before declaring a knee.

(for further information, see original paper Finding a “Kneedle” in a Haystack: Detecting Knee Points in System Behavior by Ville Satopää et al. as well)

kneedle = KneeLocator(x=df_test['x'], y=df_test['y_cum'], curve='convex', direction='increasing', online=True, S=0)
elbow_point = kneedle.elbow
elbow_point

Then I get an elbow point at x=4.

knee-elbow_sensivity

Kind regards
DK

from kneed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.