-
Notifications
You must be signed in to change notification settings - Fork 118
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
Refactor dbscan() #248
Refactor dbscan() #248
Conversation
as shown in wiki pseudocode and implemented in distance-based dbscan()
@ararslan Sorry for bothering again. I've tried to fix the inconsistencies of the two |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #248 +/- ##
==========================================
- Coverage 95.22% 95.11% -0.11%
==========================================
Files 18 18
Lines 1339 1310 -29
==========================================
- Hits 1275 1246 -29
Misses 64 64
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
a496861
to
912436a
Compare
No worries! Apologies for the delay, I've been insanely busy lately and have fallen quite far behind on GitHub notifications... It's been so long since I last looked at this package that I don't feel like I'm well suited to judge correctness. I do wonder whether an easier deprecation path would be one of these:
I feel like the latter might actually be easiest for both users and maintainers. Thoughts? |
7782248
to
858dcd8
Compare
Thanks for allowing me the breaking change :) |
counts has the same length as seeds
it just means exact match, nntree-based impl allows it
as in wiki pseudocode and nntree-based impl
instead of restricting to leafsize=
* merge the two dbscan() implementations * deprecate dbscan(dist, radius) in favor of dbscan(dist, radius, metric=nothing) * dbscan(points, ...) returns DbscanResult instead of Vector{DbscanCluster} (breaking change)
858dcd8
to
d63a009
Compare
We have two implementations of dbscan(): one is distance matrix-based, another is NNTree-based. As noted in #221, they have inconsistent APIs and return different type.
This PR consolidates the two implementations (based on NNTree one), fixes some behaviour differences and sets deprecations:
dbscan(dist, eps, minpts)
is deprecated in favor ofdbscan(dist, radius, metric=nothihg, min_neighbors=minpts)
dbscan()
addsreturn_type=
parameter, which isVector{DbscanCluster}
fordbscan(points, ...)
, but this behaviour is deprecated in favor ofreturn_type=DbscanResult
.dbscan()
now always returnsDbscanResult
. This is a breaking change for NN-tree-based implementation, which returnedVector{DbscanCluster}
.metric=nothing
, it signifies that the matrix provided is the distance matrix.