GithubHelp home page GithubHelp logo

Comments (4)

tommilligan avatar tommilligan commented on July 19, 2024

There is a reproducible test case in #65

from kneed.

arvkevi avatar arvkevi commented on July 19, 2024

Thanks, @tommilligan, good catch! I added functionality to output the y value at the knee point. In this example, there is no knee, which is throwing the IndexError.

Something like this would be great here:

# Step 6: find knee
self.knee_y, self.norm_knee_y = None, None
self.knee, self.norm_knee = self.find_knee()
if self.knee:
    self.knee_y = self.y[self.x == self.knee][0]
    self.norm_knee_y = self.y_normalized[self.x_normalized == self.norm_knee][0]

If you want to add it on #65 and update the test to assert that self.knee and self.knee_y are both None.

Probably should've bumped the version after adding the y functionality, so we can do it after this PR.

from kneed.

tommilligan avatar tommilligan commented on July 19, 2024

Thanks, that makes sense - I've updated the PR as you described. Thanks for keeping this up to date!

from kneed.

arvkevi avatar arvkevi commented on July 19, 2024

fixed in #65

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.