Commit a362ff0
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 <28983449+ricardoV94@users.noreply.github.com>
* 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 <28983449+ricardoV94@users.noreply.github.com>1 parent 6d8f569 commit a362ff0
File tree
4 files changed
+119
-33
lines changed- pymc_experimental
- tests
4 files changed
+119
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
| |||
94 | 92 | | |
95 | 93 | | |
96 | 94 | | |
| 95 | + | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
303 | | - | |
| 302 | + | |
| 303 | + | |
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
| 598 | + | |
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
615 | 614 | | |
616 | 615 | | |
617 | 616 | | |
| |||
641 | 640 | | |
642 | 641 | | |
643 | 642 | | |
644 | | - | |
| 643 | + | |
645 | 644 | | |
646 | 645 | | |
647 | 646 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
39 | 48 | | |
40 | 49 | | |
41 | 50 | | |
| |||
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
47 | | - | |
48 | | - | |
49 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
53 | 63 | | |
54 | 64 | | |
55 | 65 | | |
56 | 66 | | |
57 | | - | |
58 | | - | |
| 67 | + | |
| 68 | + | |
59 | 69 | | |
60 | 70 | | |
61 | 71 | | |
62 | 72 | | |
63 | | - | |
| 73 | + | |
64 | 74 | | |
65 | 75 | | |
66 | 76 | | |
| |||
101 | 111 | | |
102 | 112 | | |
103 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
104 | 131 | | |
105 | 132 | | |
106 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | | - | |
48 | | - | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
60 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
61 | 86 | | |
62 | 87 | | |
63 | 88 | | |
| |||
131 | 156 | | |
132 | 157 | | |
133 | 158 | | |
134 | | - | |
135 | | - | |
| 159 | + | |
| 160 | + | |
136 | 161 | | |
137 | 162 | | |
138 | 163 | | |
| |||
142 | 167 | | |
143 | 168 | | |
144 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
145 | 173 | | |
146 | 174 | | |
147 | 175 | | |
| |||
193 | 221 | | |
194 | 222 | | |
195 | 223 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | 224 | | |
200 | 225 | | |
201 | 226 | | |
| |||
220 | 245 | | |
221 | 246 | | |
222 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
223 | 283 | | |
224 | 284 | | |
225 | 285 | | |
| |||
0 commit comments