-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: model prediction API and yield table changes #267
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #267 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 18 19 +1
Lines 1764 1798 +34
Branches 270 278 +8
=========================================
+ Hits 1764 1798 +34
Continue to review full report at Codecov.
|
This was referenced Aug 25, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This changes the
visualization.data_mc
API. Previously, this function took an optionalfit_results
argument to steer which model prediction is included in plots. The generation of the model prediction is now factored out into a separate function:model_utils.prediction
.old:
new:
If the optional
fit_results
is not passed, the pre-fit prediction is generated instead. The new approach allows for more control over the model prediction, and users can customize it as needed. Model predictions have also alabel
attribute that shows up on plots and be used to construct paths to save figures.The yield table generation is split out from
visualize.data_mc
into a new function:tabulate.yields
. It uses the same API, also taking a model prediction and data as arguments.Both
visualize.data_mc
andtabulate.yields
have new optionalchannels
arguments, taking either a string specifying a channel or a list of strings. If provided, only channels matching the values are included in the plots and tables.A few new internal functions are added to
model_utils
to collect functionality used in multiple places.Breaking changes:
visualize.data_mc
now requires a model prediction instead of a model