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

#17 add SOM-based spec-z selection degrader #18

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sschmidt23
Copy link
Collaborator

Addresses #17, I added a spectroscopic degrader that trains a som based on input columns in a big test file, ingests a smaller reference file, classifies both sets into best SOM cells, then iterates through all SOM cells and tries to match the number of reference objects with a random selection of input objects for that cell, which should naturally mimic the properties of the reference data.

I included an example notebook, and I just ran the degrader on 6 million Roman-DESC objects and the 430,000 HSC galaxies, and results look good, so I think everything is working.

The biggest issue is that I'm bad at naming things, so whoever reviews should make any suggestions on config parameter names e.g. noncolor_cols, noncolor_nondet, etc...

Code Quality

  • My code follows the code style of this project
  • I have written unit tests or justified all instances of #pragma: no cover; in the case of a bugfix, a new test that breaks as a result of the bug has been added
  • My code contains relevant comments and necessary documentation for future maintainers; the change is reflected in applicable demos/tutorials (with output cleared!) and added/updated docstrings use the NumPy docstring format
  • Any breaking changes, described above, are accompanied by backwards compatibility and deprecation warnings

@sschmidt23
Copy link
Collaborator Author

I just remembered that I need to write a test for this...

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b455da8) to head (8519e65).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #18   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         3    +1     
  Lines          322       377   +55     
=========================================
+ Hits           322       377   +55     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sschmidt23 sschmidt23 linked an issue Dec 12, 2024 that may be closed by this pull request
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add degrader that uses SOM to do a spectroscopic selection
1 participant