Skip to content
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

replace linear_sum_assignment with min_weight_full_bipartite_matching #737

Closed
jeff-regier opened this issue May 2, 2023 · 0 comments · Fixed by #749
Closed

replace linear_sum_assignment with min_weight_full_bipartite_matching #737

jeff-regier opened this issue May 2, 2023 · 0 comments · Fixed by #749
Assignees

Comments

@jeff-regier
Copy link
Contributor

In metrics.py, this call to linear_sum_assignment can be slow:

row_indx, col_indx = sp_optim.linear_sum_assignment(locs_err.detach().cpu())

But we can replace it with this sparse version:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.csgraph.min_weight_full_bipartite_matching.html#scipy.sparse.csgraph.min_weight_full_bipartite_matching

The similarity between predicted/true light sources more than slack pixels apart can be set to zero.

sawanp813 pushed a commit that referenced this issue May 8, 2023
jeff-regier pushed a commit that referenced this issue May 9, 2023
… plotting functions (#749)

* Issue #737, #723

* Update to PR #749 - Naming conventions, GPU compatible

* proper naming checks for test_metrics - forgot in prior commit

---------

Co-authored-by: Sawan Patel <sawanpa@deeplearning-01.stat.lsa.umich.edu>
zhixiangteoh pushed a commit that referenced this issue May 9, 2023
… plotting functions (#749)

* Issue #737, #723

* Update to PR #749 - Naming conventions, GPU compatible

* proper naming checks for test_metrics - forgot in prior commit

---------

Co-authored-by: Sawan Patel <sawanpa@deeplearning-01.stat.lsa.umich.edu>
jeff-regier added a commit that referenced this issue May 9, 2023
* updated loading decals catalog from file; added unit tests

* Added decals RA/DEC to plocs conversion, more integration tests.

* Add test for comparing bliss catalog with SDSS frame

* don't crop FullCatalogs because it's ambigous where doing so rescales the coordinates

* fixed bad bug that I introduced rently

* Issue #737, #723

* updated loading decals catalog from file; added unit tests

* Added decals RA/DEC to plocs conversion, more integration tests.

* Add test for comparing bliss catalog with SDSS frame

* Add remaining integration tests; minor related changes to metrics and catalog.

- rewrite test_metrics to use class-scoped fixtures for processed data
- add constant to avoid 0 weight in metrics.py::match_by_locs
- add functions to move FullCatalog to device

* Add case study notebook with plots comparing catalogs

* Fix issue with decals path in testing config

* added newly pretrained sdss encoder

* reference sdss.pt instead of crowded_field.pt

* Update metric names in test_metrics

* Fix accidental values in base_config; minor fixes to tests

---------

Co-authored-by: Jeffrey Regier <regier@umich.edu>
Co-authored-by: Sawan Patel <sawanpa@deeplearning-01.stat.lsa.umich.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants