-
Notifications
You must be signed in to change notification settings - Fork 159
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
Fixes to _compute_cluster_metrics #1763
Conversation
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.
This looks good!
Please could we have a test that it now works for the link_only
case. Feel free to use the reprex from my example, or something different, whatever you prefer.
One other comment - should we be setting num edges to 0
rather than NaN
in the case of a single-node cluster. I'm not sure density is defined, so a NaN
type value is fine, but edges should probably be 0
? (Sorry if you've had this discussion before)
I think you could use COALESCE(n_edges, 0) AS N_EDGES
in the final sql statement for this
Thanks for your comment Robin! Have set n_edges to 0 for single nodes and added a test for link_only too. Do you think it would be worth casting the |
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.
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 👍
Type of PR
Is your Pull Request linked to an existing Issue or Pull Request?
Addressing Robin's comments on this PR for adding cluster metrics computation functionality to linker #1677
Give a brief description for the solution you have provided
threshold_match_probability: float = None
_size_density_sql()
and added commentsPR Checklist