Comments (12)
The array is about 6000+ elements. If I have some time, I will do that. Thanks for the confirmation!
from kneed.
from kneed.
Hi @MattConflitti thanks for posting, would you mind sharing which version you are using?
import kneed
print(kneed.__version__)
^^^somehow I managed to not include this in the source code^^^
I'll make a PR to update this.
You could try this from the command line though:
pip freeze | grep kneed
from kneed.
It looks like that attribute wasn't set.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-63-b9a19a10a516> in <module>()
1 import kneed
----> 2 print(kneed.__version__)
AttributeError: module 'kneed' has no attribute '__version__'
I installed with pip and that says I have kneed==0.3.1
from kneed.
Great, that's the latest version. The last question, have you tried setting interp_method='polynomial'
in KneeLocator
?
from kneed.
I did, this is the result. Similar to the previous one.
from kneed.
Thanks for checking.
Do you want to post x, y
here so we're working off the same arrays?
You are correct, the knee should be located at the max
of the distance curve yd
.
Feel free to hack away on this bug with a pull request, otherwise, I'll try to reproduce the errors as soon as a can.
from kneed.
It should be easy enough to reproduce, thanks again, hope to jump on this soon.
from kneed.
This x
and y
reproduce a similar error:
n = 6000
x = range(1, n+1)
y = sorted(np.random.gamma(0.5, 1.0, n), reverse=True)
from kneed.
This sparked a long-overdue refactor, working on this in #34
from kneed.
Hi, @MattConflitti thanks again for raising this issue, the package really needed this update! I spent some time re-reading the paper to ensure that I understood the algorithm correctly. The issue was that kneed
was finding all knees and reporting the most recent (or last) knee point. As a result, setting the S
parameter had no effect because the last knee was always returned.
I added your example to the README in #34 because it highlights how tuning the S
parameter has an effect on the detected knee.
from kneed.
@MattConflitti going to close this for now, but I'm happy to re-open if this doesn't solve the issue.
from kneed.
Related Issues (20)
- IndexError: Line 271 HOT 1
- make matplotlib an extra dependency HOT 1
- can not detect knee/elbow point in python 3.9 HOT 2
- Documentation states default for online is True, but it is really False HOT 1
- How to use it with Multivariate X, Throwing interpolation axis Error HOT 1
- Ability to change title, and set xlabel and ylabel for visualization function HOT 3
- Issues about the online correction HOT 1
- GH Actions bug HOT 1
- Remove unnecessary warning HOT 2
- Add readthedocs.yaml file
- Remove travis badge from README HOT 1
- Update pythonpublish workflow
- Knee point changes depending on input length
- missing comma HOT 1
- Problem with curves with multiple slopes HOT 3
- Unable to detect knee and elbow HOT 1
- Request: Documentation
- Implementation Detail HOT 1
- TypeError: transform_y() takes 3 positional arguments but 4 were given HOT 1
- y_transform doesn't work with unevenly spaced x values HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kneed.