You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there is an issue in the way the knees and elbows are ordered when online = True. I am using the kneed package in R. And the code below is reproducible:
# import kneed as knkn<-reticulate::import(module="kneed")
# Compute kernel density estimates of mtcars$mpgdens<- density(x=mtcars$mpg,
from=19,
to=45)
# Identify knees in the density distributionkneed.res<-kn$KneeLocator(x=dens$x,
y=dens$y,
S=1,
curve="convex",
direction="decreasing",
online=TRUE)
# Knee and elbow values are not orderedkneed.res$all_knees# {26.93737769080235, 19.0, 36.50293542074364}kneed.res$all_elbows# {26.93737769080235, 19.0, 36.50293542074364}
I have to mention that this is not a general observation, but I found it occurring in many of my implementations of the function.
Best,
Leon
The text was updated successfully, but these errors were encountered:
Good catch. all_knees is a Python set(), which is unordered. I don't know why I chose to use a set there. It's old code at this point. I'll take a look and probably convert it to an array. Thanks!
Hi,
I think there is an issue in the way the knees and elbows are ordered when
online = True
. I am using thekneed
package inR
. And the code below is reproducible:I have to mention that this is not a general observation, but I found it occurring in many of my implementations of the function.
Best,
Leon
The text was updated successfully, but these errors were encountered: