-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set data when building Linearmodel (#249)
* Create test of fitted parameter values * Set data when creating model * Clean up sample_prior_predictive Since model_builder must create model object and set data, data only needs to be set if model object already exists and no need to check for model object before sampling. * Apply suggestions from code review Co-authored-by: Ricardo Vieira <[email protected]> * Add join=right to extend calls * Update test_parameter_fit based on comments from PR review Use np.testing.assert_allclose instead of pytest.approx Make fitted_model use fewer samples for fitting and do a separate model and fit for checking parameter recovery. * Add tests for extend_idata parameters * Update based on code review comments Make copies of `fitted_model_instance` to keep tests from interfering with each other. Combine `test_sample_prior_extend_idata_param` and `test_sample_posterior_extend_idata_param` to reduce code repetition. * Work around `deepcopy` not working for model objects * Mark correct test for skipping on win32 --------- Co-authored-by: Ricardo Vieira <[email protected]>
- Loading branch information
1 parent
6d8f569
commit a362ff0
Showing
4 changed files
with
119 additions
and
33 deletions.
There are no files selected for viewing
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
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
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
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