LSSTDESC / rail_sklearn

RAIL algorithms that depend on scikit-learn.
MIT License
1 stars 0 forks source link

add 'only_colors' option to KNearNeigh #20 #21

Closed sschmidt23 closed 2 months ago

sschmidt23 commented 2 months ago

Addresses issue #20 by adding an only_colors config param to KNearnNeigh, if set to True this does not use the reference band magnitude in the nearest neighbor calculation. I also added an explicit np.float32 cast to the nondetect replacements, as I noticed a ton of deprecation warnings from pandas when running the tests where it was not realizing that 27.79 was a float32 and threatening to throw an exception on a future pandas version. Also, some minor linting fixes for whitespace and such in the test_algos.py

Code Quality

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.81%. Comparing base (7b08951) to head (d8dc15d). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #21 +/- ## ========================================== + Coverage 95.80% 95.81% +0.01% ========================================== Files 4 4 Lines 286 287 +1 ========================================== + Hits 274 275 +1 Misses 12 12 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.