-
Couldn't load subscription status.
- Fork 72
Minor fixes to modelbuilder class #452
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
Minor fixes to modelbuilder class #452
Conversation
|
Looks decent! Make the lint errors go away and the unit tests in model builder pass, and I think we can merge this |
|
pre-commit.ci autofix |
|
Thanks @zaxtax, got autofix to do it! Let me know if anything else. |
8ffe9ce to
4d5a116
Compare
|
Hi @zaxtax, I rebased as there seems to be some problems with pytest. Anything else I need to do here? |
4d5a116 to
93c5ed6
Compare
|
Hi @zaxtax, is everything okay with this pull request now? Very little left in it! |
|
Thanks @butterman0 and sorry for the delay |
Made the following fixes:
_validate_datamethod is called forpredict_posteriormethod, but notpredictmethod. Should be called in both as the only difference between the two should be whether mean or full posterior samples are returned.self.is_fitted_ = Falseset in class init, but not set toTruewhen model is fitted withfit. Decided to keep the variable as it is useful, therefore set toTrueafter 1)fitcalled 2)loadwith fitted data.The alternative is to remove
self.is_fitted_altogether, seeing as the other functions tend to check for fitting via the existence of inference data (model.idata) instead. Alternatively, could refactor these checks to instead useis_fitted_.