kneed
kneed copied to clipboard
Potentially wrong plot and/or knee identification
Hi @arvkevi,
Thank you for this cool library! 💯
I am experimenting with the following code:
from kneed import KneeLocator
import matplotlib.pyplot as plt
x = [0.90000, 0.99000, 0.99900, 0.99990, 0.99999]
y = [0.000019, 0.000046, 0.000050, 0.000050, 0.000050]
knee = KneeLocator(x, y, S=0.0, direction="increasing", curve="convex", online=True, interp_method="interp1d")
print(f"knee points: ({knee.knee}, {knee.knee_y})")
knee.plot_knee()
plt.show()
knee.plot_knee_normalized()
plt.show()
Output:
knee points: (0.99999, 5e-05)
I am not sure why the normalized knee plot is identifying the knee/elbow at 0 and I'm wondering why the knee point identified is at 0.99999
? Shouldn't it be at 0.99
?
Looking forward to your kind reply.
Thanks for reporting this. It looks like making the changes discussed here addresses this issue.
Thank you for the prompt response. Is there any way I could help? I am using kneed for my research project and would love to get this issue fixed "soonish" as my data has such unevenly spaced points.
Thanks for offering to help. Unfortunately, I won't be able to release a new version soon. I need to make sure any breaking changes are identified and handled, and that it's "correct." My recommendation for your research project is to clone the repo (or just copy KneeLocator
class) and attempt to introduce the changes mentioned above locally.
Noted. I'll do as you have suggested. Have a pleasant week.