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
In greedy_convex_hull, the function projected_subgradient_descent!() is used to calculate the distance from a point in the dataset to the current hull. However, I have observed that this function sometimes returns a distance greater than a previously stored distance (cached_distance) or greater than the distance to the most recently added point, which should not be possible. Since the distance is not being correctly updated and occasionally increases, the else branch of the function is executed more often than necessary, leading to increased runtime and reduced accuracy.
To address this, I propose adding an additional check before updating distance_cache, ensuring that the minimum value among cached_distance, the distance to the latest vector, and the result from subgradient descent is used. This change should improve both performance and accuracy.
The text was updated successfully, but these errors were encountered:
Description
In
greedy_convex_hull
, the functionprojected_subgradient_descent!()
is used to calculate the distance from a point in the dataset to the current hull. However, I have observed that this function sometimes returns a distance greater than a previously stored distance (cached_distance
) or greater than the distance to the most recently added point, which should not be possible. Since the distance is not being correctly updated and occasionally increases, the else branch of the function is executed more often than necessary, leading to increased runtime and reduced accuracy.To address this, I propose adding an additional check before updating
distance_cache
, ensuring that the minimum value amongcached_distance
, the distance to the latest vector, and the result from subgradient descent is used. This change should improve both performance and accuracy.The text was updated successfully, but these errors were encountered: