Skip to content

Improve greedy hull algorithm #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lottekremer opened this issue May 26, 2025 · 0 comments · May be fixed by #104
Open

Improve greedy hull algorithm #103

lottekremer opened this issue May 26, 2025 · 0 comments · May be fixed by #104

Comments

@lottekremer
Copy link
Contributor

Description

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.

@lottekremer lottekremer linked a pull request May 28, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant