guts-base 1.0.7__py3-none-any.whl → 1.0.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of guts-base might be problematic. Click here for more details.
- guts_base/__init__.py +1 -1
- guts_base/sim/base.py +3 -1
- guts_base/sim/report.py +6 -4
- {guts_base-1.0.7.dist-info → guts_base-1.0.9.dist-info}/METADATA +1 -1
- {guts_base-1.0.7.dist-info → guts_base-1.0.9.dist-info}/RECORD +9 -9
- {guts_base-1.0.7.dist-info → guts_base-1.0.9.dist-info}/WHEEL +0 -0
- {guts_base-1.0.7.dist-info → guts_base-1.0.9.dist-info}/entry_points.txt +0 -0
- {guts_base-1.0.7.dist-info → guts_base-1.0.9.dist-info}/licenses/LICENSE +0 -0
- {guts_base-1.0.7.dist-info → guts_base-1.0.9.dist-info}/top_level.txt +0 -0
guts_base/__init__.py
CHANGED
guts_base/sim/base.py
CHANGED
|
@@ -103,6 +103,8 @@ class GutsBase(SimulationBase):
|
|
|
103
103
|
self.unit_time: Literal["day", "hour", "minute", "second"] = "day"
|
|
104
104
|
if hasattr(self.config.simulation, "unit_time"):
|
|
105
105
|
self.unit_time = self.config.simulation.unit_time # type: ignore
|
|
106
|
+
else:
|
|
107
|
+
self.config.simulation.unit_time = self.unit_time
|
|
106
108
|
|
|
107
109
|
if hasattr(self.config.simulation, "skip_data_processing"):
|
|
108
110
|
self._skip_data_processing = not (
|
|
@@ -508,7 +510,7 @@ class GutsBase(SimulationBase):
|
|
|
508
510
|
)
|
|
509
511
|
|
|
510
512
|
scenarios.update({
|
|
511
|
-
f"
|
|
513
|
+
f"{_name}_{coord}": scenario
|
|
512
514
|
})
|
|
513
515
|
|
|
514
516
|
return scenarios
|
guts_base/sim/report.py
CHANGED
|
@@ -23,12 +23,13 @@ class GutsReport(Report):
|
|
|
23
23
|
table_parameter_stat_focus = "mean"
|
|
24
24
|
units = xr.Dataset({
|
|
25
25
|
"metric": ["unit"],
|
|
26
|
-
"k_d": ("metric", ["1/
|
|
26
|
+
"k_d": ("metric", ["1/T"])
|
|
27
27
|
})
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
def additional_reports(self, sim: "SimulationBase"):
|
|
31
31
|
super().additional_reports(sim=sim)
|
|
32
|
+
self.model_input(sim)
|
|
32
33
|
self.model_fits(sim)
|
|
33
34
|
self.LCx_estimates(sim)
|
|
34
35
|
|
|
@@ -246,6 +247,7 @@ def flatten_coords(dataset: xr.Dataset, keep_dims):
|
|
|
246
247
|
producing a array with harmonized dimensions
|
|
247
248
|
"""
|
|
248
249
|
ds = dataset.copy()
|
|
250
|
+
ds = ds.reset_coords(drop=True)
|
|
249
251
|
for var_name, data_var in ds.data_vars.items():
|
|
250
252
|
extra_coords = [k for k in list(data_var.coords.keys()) if k not in keep_dims]
|
|
251
253
|
if len(extra_coords) == 0:
|
|
@@ -325,18 +327,18 @@ class ParameterConverter:
|
|
|
325
327
|
results_copy = sim_copy.evaluate(parameters=sim_copy.config.model_parameters.value_dict)
|
|
326
328
|
results_orig = sim_orig.evaluate(parameters=sim_orig.config.model_parameters.value_dict)
|
|
327
329
|
|
|
328
|
-
np.testing.assert_allclose(results_copy.H, results_orig.H, atol=0.
|
|
330
|
+
np.testing.assert_allclose(results_copy.H, results_orig.H, atol=0.1, rtol=0.05)
|
|
329
331
|
|
|
330
332
|
@staticmethod
|
|
331
333
|
def validate_parameter_conversion_posterior_mean(sim_copy, sim_orig):
|
|
332
334
|
results_copy = sim_copy.evaluate(parameters=sim_copy.point_estimate("mean", to="dict"))
|
|
333
335
|
results_orig = sim_orig.evaluate(parameters=sim_orig.point_estimate("mean", to="dict"))
|
|
334
336
|
|
|
335
|
-
np.testing.assert_allclose(results_copy.H, results_orig.H, atol=0.
|
|
337
|
+
np.testing.assert_allclose(results_copy.H, results_orig.H, atol=0.1, rtol=0.05)
|
|
336
338
|
|
|
337
339
|
@staticmethod
|
|
338
340
|
def validate_parameter_conversion_posterior_map(sim_copy, sim_orig):
|
|
339
341
|
results_copy = sim_copy.evaluate(parameters=sim_copy.point_estimate("map", to="dict"))
|
|
340
342
|
results_orig = sim_orig.evaluate(parameters=sim_orig.point_estimate("map", to="dict"))
|
|
341
343
|
|
|
342
|
-
np.testing.assert_allclose(results_copy.H, results_orig.H, atol=0.
|
|
344
|
+
np.testing.assert_allclose(results_copy.H, results_orig.H, atol=0.1, rtol=0.05)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
guts_base/__init__.py,sha256=
|
|
1
|
+
guts_base/__init__.py,sha256=RW-pk7yhci5F8jUvWo4m7tBFyLtXxr8zGwGdFS95_6Q,227
|
|
2
2
|
guts_base/mod.py,sha256=AzOCg1A8FP5EtVfp-66HT7G7h_wnHkenieaxTc9qCyk,5796
|
|
3
3
|
guts_base/plot.py,sha256=Sr_d0sXHNajPLPelcGl72yCOEEqB7NGNWhViKYAiTng,6692
|
|
4
4
|
guts_base/prob.py,sha256=ITwo5dAGMHr5xTldilHMbKU6AFsWo4_ZwbfaXh97Gew,5443
|
|
@@ -11,15 +11,15 @@ guts_base/data/survival.py,sha256=U-Ehloo8vnD81VeIglXLEUHX9lt7SjtEs2YEB0D9FHE,50
|
|
|
11
11
|
guts_base/data/time_of_death.py,sha256=dHG5jhK--WkemTxJtHVgfdo-FWlFHslBQ0PcYape9fI,22296
|
|
12
12
|
guts_base/data/utils.py,sha256=u3gGDJK15MfRUP4iIxsS-I1oqxD2qH_ugsT7o_Eac18,236
|
|
13
13
|
guts_base/sim/__init__.py,sha256=sbHmT1p2saN0MJ-iYnCDOHjkHtTcKgm7X-dHX5o0tYA,435
|
|
14
|
-
guts_base/sim/base.py,sha256=
|
|
14
|
+
guts_base/sim/base.py,sha256=eMhdkdSit0aa0JbpfwVD_8E03-ooiFDI4UA9bAmC3j8,38110
|
|
15
15
|
guts_base/sim/constructors.py,sha256=Kz9FHIH3EHsSIKd9sQgHa3eveniFifFlk1Hf-QR69Pg,875
|
|
16
16
|
guts_base/sim/ecx.py,sha256=PeX8UVF1HMMNHaIU-jL6dml4JGezhWwiGSqPFJbOFM4,20808
|
|
17
17
|
guts_base/sim/mempy.py,sha256=IHd87UrmdXpC7y7q0IjYQJH075frjbp2a-dMVBeqZ0U,10164
|
|
18
|
-
guts_base/sim/report.py,sha256=
|
|
18
|
+
guts_base/sim/report.py,sha256=spjq_2Qcie2ZeSAAjaQ9YuBXLzYXWaVny7a3fSc1ZiI,12777
|
|
19
19
|
guts_base/sim/utils.py,sha256=Qj_FPH6kywVxOwgCerS7w5CyuYR9HKmvBWFpmxwDFgk,256
|
|
20
|
-
guts_base-1.0.
|
|
21
|
-
guts_base-1.0.
|
|
22
|
-
guts_base-1.0.
|
|
23
|
-
guts_base-1.0.
|
|
24
|
-
guts_base-1.0.
|
|
25
|
-
guts_base-1.0.
|
|
20
|
+
guts_base-1.0.9.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
21
|
+
guts_base-1.0.9.dist-info/METADATA,sha256=tZe-tFE8F6AStNqjiVL-msOxSh8fdYaT1jUpzf2v2MI,45426
|
|
22
|
+
guts_base-1.0.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
23
|
+
guts_base-1.0.9.dist-info/entry_points.txt,sha256=icsHzG2jQ90ZS7XvLsI5Qj0-qGuPv2T0RBVN5daGCPU,183
|
|
24
|
+
guts_base-1.0.9.dist-info/top_level.txt,sha256=PxhBgUd4r39W_VI4FyJjARwKbV5_glgCVnd6v_zAGdE,10
|
|
25
|
+
guts_base-1.0.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|