Repository navigation
Precompute nn ranking for DR datasets - #841
scottgigante-immunai merged 6 commits into
Conversation
|
I agree this is a bit hacky. @michalk8 I think you added this originally during the jamboree, do you have any comments or maybe other suggestions for how this could be sped up? |
The simplest would be to update the update data on |
|
I'd rather precompute it actively once per run than have it precomputed in the cloud -- better at least to have it be transparent about how it's calculated. In v2 we will be able to compose metrics of multiple components and pass data directly from the dataset to the metric (bypassing the method) which solves this problem in a much cleaner way. |
|
In terms of how this could be properly sped up, it seems to me that most of these metrics don't actually need the full knn matrix computed. The big problem here is the memory cost of storing the full nxn dense matrix -- if we're only evaluating most of these metrics with |
|
Tests passing at https://tower.nf/orgs/openproblems-bio/workspaces/openproblems-bio/watch/1jOQdpGEMso24E . I propose we merge it this way for now while @michalk8 proposes a more efficient computation so we don't have to subsample datasets for the entire task just for this metric. (One possibility -- just sample datasets before computing this metric??) |
Codecov ReportBase: 95.60% // Head: 95.62% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #841 +/- ##
==========================================
+ Coverage 95.60% 95.62% +0.01%
==========================================
Files 187 188 +1
Lines 4980 5000 +20
Branches 273 273
==========================================
+ Hits 4761 4781 +20
Misses 141 141
Partials 78 78
Flags with carried forward coverage won't be shown. Click here to find out more.
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 at Codecov. |
Adding a bigger dataset to the dimensionality reduction task accidentally cost us $1000, because we're computing pairwise distances on each dataset n_methods * n_nn_ranking_metrics times (which is a lot). This PR is a hack -- we precompute the NN ranking matrix, which is costly upfront, but it only happens once. Ideally we could define bespoke metric dependencies, but that sounds like a v2 feature.
cc @rcannood