GithubHelp home page GithubHelp logo

Comments (5)

arvkevi avatar arvkevi commented on July 19, 2024 1

Hi @Gabriel-p, thanks for checking out the repo and posting the issue, I think you found a bug. I will try to fix it in the next couple of days.

from kneed.

arvkevi avatar arvkevi commented on July 19, 2024 1

Hey @Gabriel-p sorry for the delay, I have a working branch and an open PR that identifies the knee in your example at x = 73 using the following arguments:

kl = KneeLocator(x, y, curve="convex", direction="increasing", online=True)

You can try installing from source for now until I get this merged and cut a new release.

from kneed.

arvkevi avatar arvkevi commented on July 19, 2024 1

Sure, @Gabriel-p -- I've been meaning to make proper documentation for this repo for a year now... I hope this explanation will do, for now.

When online=False the first knee point identified is returned regardless of whether it's the local maxima on the difference curve or the global maxima. So the algorithm stops early. When online=True, kneed runs in online mode and "corrects" itself by continuing to overwrite any previously identified knees.

Here's a quick example to show the usage of the parameter.

online=False:

from kneed import KneeLocator
y = [0, 1.0, 1.5, 1.8, 1.9, 2.0, 3.5, 5.0, 7.0, 9.0, 9.5, 9.75, 9.9, 10]
kl = KneeLocator(range(len(y)), y, curve="concave", direction="increasing", online=False)
kl.plot_knee_normalized()

image

online=True:

kl = KneeLocator(range(len(y)), y, curve="concave", direction="increasing", online=True)
kl.plot_knee_normalized()

image

from kneed.

Gabriel-p avatar Gabriel-p commented on July 19, 2024

Thank you @arvkevi! I'm not entirely sure what the online argument does. Would you mind explaining what it does a bit more in the README?

from kneed.

Gabriel-p avatar Gabriel-p commented on July 19, 2024

Thank you very much @arvkevi, that explains it clearly.

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.