Add multiple threshold clustering to linker #2617
Open
+463
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of PR
Is your Pull Request linked to an existing Issue or Pull Request?
Give a brief description for the solution you have provided
Adding
linker.clustering.cluster_pairwise_predictions_at_multiple_thresholds
to the linker to provide similar behaviour tolinker.clustering.cluster_pairwise_predictions_at_threshold
, including outputting node information alongside the cluster_ids (unlike the non-linker version).Part of a wider piece of work to generate graph metrics for multi-threshold clustering (graph metrics requires a linker).
One decision point I would appreciate a second opinion on is the treatment of
cluster_summary_stats
. In the non-linker version there is a parameter to return summary statistics as opposed to the whole result. Here I have added the summary stats to ametadata
dictionary (inspired by the Andy's graph metrics). I think this covers all bases, but open to any other suggestions. Or if there is a better way to structure the code to make it more streamlined.PR Checklist