guts-base 1.0.7__tar.gz → 1.0.9__tar.gz

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.

Files changed (36) hide show
  1. {guts_base-1.0.7 → guts_base-1.0.9}/PKG-INFO +1 -1
  2. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/__init__.py +1 -1
  3. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/sim/base.py +3 -1
  4. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/sim/report.py +6 -4
  5. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base.egg-info/PKG-INFO +1 -1
  6. {guts_base-1.0.7 → guts_base-1.0.9}/pyproject.toml +2 -2
  7. {guts_base-1.0.7 → guts_base-1.0.9}/LICENSE +0 -0
  8. {guts_base-1.0.7 → guts_base-1.0.9}/README.md +0 -0
  9. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/data/__init__.py +0 -0
  10. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/data/expydb.py +0 -0
  11. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/data/generator.py +0 -0
  12. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/data/openguts.py +0 -0
  13. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/data/preprocessing.py +0 -0
  14. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/data/survival.py +0 -0
  15. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/data/time_of_death.py +0 -0
  16. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/data/utils.py +0 -0
  17. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/mod.py +0 -0
  18. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/plot.py +0 -0
  19. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/prob.py +0 -0
  20. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/sim/__init__.py +0 -0
  21. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/sim/constructors.py +0 -0
  22. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/sim/ecx.py +0 -0
  23. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/sim/mempy.py +0 -0
  24. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base/sim/utils.py +0 -0
  25. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base.egg-info/SOURCES.txt +0 -0
  26. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base.egg-info/dependency_links.txt +0 -0
  27. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base.egg-info/entry_points.txt +0 -0
  28. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base.egg-info/requires.txt +0 -0
  29. {guts_base-1.0.7 → guts_base-1.0.9}/guts_base.egg-info/top_level.txt +0 -0
  30. {guts_base-1.0.7 → guts_base-1.0.9}/setup.cfg +0 -0
  31. {guts_base-1.0.7 → guts_base-1.0.9}/tests/test_data_import.py +0 -0
  32. {guts_base-1.0.7 → guts_base-1.0.9}/tests/test_ecx.py +0 -0
  33. {guts_base-1.0.7 → guts_base-1.0.9}/tests/test_from_pymob.py +0 -0
  34. {guts_base-1.0.7 → guts_base-1.0.9}/tests/test_scripted_simulations.py +0 -0
  35. {guts_base-1.0.7 → guts_base-1.0.9}/tests/test_simulations.py +0 -0
  36. {guts_base-1.0.7 → guts_base-1.0.9}/tests/test_symbolic_solve.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: guts_base
3
- Version: 1.0.7
3
+ Version: 1.0.9
4
4
  Summary: Basic GUTS model implementation in pymob
5
5
  Author-email: Florian Schunck <fluncki@protonmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -4,7 +4,7 @@ from . import data
4
4
  from . import prob
5
5
  from . import plot
6
6
 
7
- __version__ = "1.0.7"
7
+ __version__ = "1.0.9"
8
8
 
9
9
  from .sim import (
10
10
  GutsBase,
@@ -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"1day_exposure_{coord}": scenario
513
+ f"{_name}_{coord}": scenario
512
514
  })
513
515
 
514
516
  return scenarios
@@ -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/t"])
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.001, rtol=0.001)
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.001, rtol=0.001)
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.001, rtol=0.001)
344
+ np.testing.assert_allclose(results_copy.H, results_orig.H, atol=0.1, rtol=0.05)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: guts_base
3
- Version: 1.0.7
3
+ Version: 1.0.9
4
4
  Summary: Basic GUTS model implementation in pymob
5
5
  Author-email: Florian Schunck <fluncki@protonmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "guts_base"
7
- version = "1.0.7"
7
+ version = "1.0.9"
8
8
  authors = [
9
9
  { name="Florian Schunck", email="fluncki@protonmail.com" },
10
10
  ]
@@ -49,7 +49,7 @@ import-openguts = "guts_base.data.openguts:create_database_and_import_data"
49
49
  convert-time-of-death-to-openguts = "guts_base.data.time_of_death:time_of_death_to_openguts"
50
50
 
51
51
  [tool.bumpver]
52
- current_version = "1.0.7"
52
+ current_version = "1.0.9"
53
53
  version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
54
54
  commit_message = "bump version {old_version} -> {new_version}"
55
55
  tag_message = "{new_version}"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes