[FIX] Calibration model: Work with numpy data#5159
Merged
janezd merged 2 commits intobiolab:masterfrom Feb 26, 2021
Merged
Conversation
db964ae to
dc93080
Compare
Codecov Report
@@ Coverage Diff @@
## master #5159 +/- ##
==========================================
- Coverage 85.21% 85.21% -0.01%
==========================================
Files 300 300
Lines 61002 61010 +8
==========================================
+ Hits 51985 51988 +3
- Misses 9017 9022 +5 |
2d54536 to
0b119c3
Compare
94fa423 to
535547e
Compare
Contributor
|
I agree it's not nice, but it works. |
This file contains hidden or 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
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.
Issue
Calibration models do not support passing NumPy data since their
data_to_model_domaindoes not transform data correctly. It should take into account the base model domain. The error is that the calibration model stores the wrong domain. It first sets the base_learners domain, but it is then overwritten with the wrong (not preprocessed) domain.This code snipet works with other models but not with callibrations:
The correction would support explain the model on calibration learner.
Description of changes
This PR fixes the base learner such that it does not overwrite the domain of models that already set it. It only set the domain for other models (mostly SKL models).
If it looks ugly this error could be also resolved by completely removing the line that set the domain. Then all models would need to pass the domain to the model's constructor. It would be a major change in models and learners.
Includes