-
Notifications
You must be signed in to change notification settings - Fork 42
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
Detection predictions blending based on clustering sampled gaussians #116
base: master
Are you sure you want to change the base?
Detection predictions blending based on clustering sampled gaussians #116
Conversation
Codecov Report
@@ Coverage Diff @@
## master #116 +/- ##
==========================================
- Coverage 87% 85.39% -1.62%
==========================================
Files 70 70
Lines 2602 2657 +55
==========================================
+ Hits 2264 2269 +5
- Misses 338 388 +50
Continue to review full report at Codecov.
|
c = mask.sum() / max_n_samples | ||
x, y = km.cluster_centers_[i] | ||
r = np.mean((data[mask] - km.cluster_centers_[i])**2) | ||
objs.append((c, x, y, r)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the choice of average of squares instead of the Euclidean distance ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean for the calculation of the radius r
? Because I initially used the radius as the variance of multivariate normal that I sampled from. So therefore here using that as an estimate of the radius.
|
||
objs = [] | ||
|
||
for i in range(n_clusters): | ||
mask = labels == i | ||
c = mask.sum() / max_n_samples | ||
x, y = data[mask].mean(axis=0) | ||
r = np.sqrt(np.mean((data[mask] - np.array([x, y]))**2)) * 2 | ||
r = np.mean((data[mask] - np.array([x, y]))**2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
c970190
to
12512a3
Compare
This already adds the one based on HDBSCAN.