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

Fix _get_likelihoods not generating likelihood values #1720

Merged
merged 6 commits into from
Jan 3, 2024

Conversation

frances-h
Copy link
Contributor

Sampling after calling reset_sampling was different because both fit and sample have to call transform in HMA. Resetting sampling in the data processor after fitting re-aligns the randomness for sampling.

@codecov-commenter
Copy link

codecov-commenter commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d987178) 97.08% compared to head (8d170d1) 97.13%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1720      +/-   ##
==========================================
+ Coverage   97.08%   97.13%   +0.04%     
==========================================
  Files          48       48              
  Lines        4499     4507       +8     
==========================================
+ Hits         4368     4378      +10     
+ Misses        131      129       -2     

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

@frances-h frances-h marked this pull request as draft December 15, 2023 18:50
Comment on lines +513 to +520
transformed = data_processor.transform(table_rows)
if transformed.index.name:
table_rows = table_rows.set_index(transformed.index.name)

table_rows = pd.concat(
[transformed, table_rows.drop(columns=transformed.columns)],
axis=1
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to transform the child row while keeping any extra columns in order for _get_likelihoods to work properly.

@frances-h frances-h marked this pull request as ready for review December 19, 2023 16:30
Copy link
Contributor

@amontanez24 amontanez24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@frances-h frances-h merged commit 64e8df2 into main Jan 3, 2024
37 checks passed
@frances-h frances-h deleted the fix-likelihood-match branch January 3, 2024 17:35
@amontanez24 amontanez24 added this to the 1.9.0 milestone Jan 9, 2024
@frances-h frances-h mentioned this pull request Jan 11, 2024
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.

4 participants