bella-companion 0.0.48__tar.gz → 0.1.1__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.
Files changed (125) hide show
  1. {bella_companion-0.0.48 → bella_companion-0.1.1}/PKG-INFO +8 -5
  2. {bella_companion-0.0.48 → bella_companion-0.1.1}/pyproject.toml +12 -12
  3. bella_companion-0.1.1/src/bella_companion/.DS_Store +0 -0
  4. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/eucovid/beast_configs/GLM.xml +27 -17
  5. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/eucovid/beast_configs/MLP.xml +2 -3
  6. bella_companion-0.1.1/src/bella_companion/eucovid/run_beast.py +36 -0
  7. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/figures/epi_multitype.py +1 -1
  8. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/figures/fbd_2traits.py +1 -1
  9. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/utils/beast.py +2 -2
  10. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/utils/explain/pdp.py +14 -7
  11. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/utils/explain/shap.py +10 -8
  12. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/utils/explain/typeguards.py +1 -1
  13. bella_companion-0.0.48/bella_companion/__pycache__/__init__.cpython-310.pyc +0 -0
  14. bella_companion-0.0.48/bella_companion/__pycache__/cli.cpython-310.pyc +0 -0
  15. bella_companion-0.0.48/bella_companion/__pycache__/features.cpython-310.pyc +0 -0
  16. bella_companion-0.0.48/bella_companion/eucovid/__pycache__/__init__.cpython-310.pyc +0 -0
  17. bella_companion-0.0.48/bella_companion/eucovid/__pycache__/run_beast.cpython-310.pyc +0 -0
  18. bella_companion-0.0.48/bella_companion/eucovid/beast_configs/Nonparametric.xml +0 -399
  19. bella_companion-0.0.48/bella_companion/eucovid/data/case_data.csv +0 -346
  20. bella_companion-0.0.48/bella_companion/eucovid/data/change_dates.csv +0 -8
  21. bella_companion-0.0.48/bella_companion/eucovid/data/osi.csv +0 -376
  22. bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/closedborders_7e_nt.csv +0 -35
  23. bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/dist_7e_ls.csv +0 -35
  24. bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/flight_7e_ls.csv +0 -35
  25. bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/flight_pop_x_7e_ls.csv +0 -35
  26. bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/osi_x_7e_ls.csv +0 -35
  27. bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/osi_y_7e_ls.csv +0 -35
  28. bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/pop_x_7e_ls.csv +0 -35
  29. bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/pop_y_7e_ls.csv +0 -35
  30. bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/sharedborders_7e_nt.csv +0 -35
  31. bella_companion-0.0.48/bella_companion/eucovid/data/predictors/changetimes_all_7e.csv +0 -6
  32. bella_companion-0.0.48/bella_companion/eucovid/run_beast.py +0 -130
  33. bella_companion-0.0.48/bella_companion/platyrrhine/__pycache__/__init__.cpython-310.pyc +0 -0
  34. bella_companion-0.0.48/bella_companion/platyrrhine/__pycache__/results.cpython-310.pyc +0 -0
  35. bella_companion-0.0.48/bella_companion/platyrrhine/__pycache__/run_beast.cpython-310.pyc +0 -0
  36. bella_companion-0.0.48/bella_companion/platyrrhine/__pycache__/summarize.cpython-310.pyc +0 -0
  37. bella_companion-0.0.48/bella_companion/platyrrhine/__pycache__/summarize_logs.cpython-310.pyc +0 -0
  38. bella_companion-0.0.48/bella_companion/simulations/__pycache__/__init__.cpython-310.pyc +0 -0
  39. bella_companion-0.0.48/bella_companion/simulations/__pycache__/features.cpython-310.pyc +0 -0
  40. bella_companion-0.0.48/bella_companion/simulations/__pycache__/generate_data.cpython-310.pyc +0 -0
  41. bella_companion-0.0.48/bella_companion/simulations/__pycache__/generate_figures.cpython-310.pyc +0 -0
  42. bella_companion-0.0.48/bella_companion/simulations/__pycache__/metrics.cpython-310.pyc +0 -0
  43. bella_companion-0.0.48/bella_companion/simulations/__pycache__/run_beast.cpython-310.pyc +0 -0
  44. bella_companion-0.0.48/bella_companion/simulations/__pycache__/summarize.cpython-310.pyc +0 -0
  45. bella_companion-0.0.48/bella_companion/simulations/__pycache__/summarize_logs.cpython-310.pyc +0 -0
  46. bella_companion-0.0.48/bella_companion/simulations/figures/__pycache__/__init__.cpython-310.pyc +0 -0
  47. bella_companion-0.0.48/bella_companion/simulations/figures/__pycache__/epi_multitype.cpython-310.pyc +0 -0
  48. bella_companion-0.0.48/bella_companion/simulations/figures/__pycache__/epi_skyline.cpython-310.pyc +0 -0
  49. bella_companion-0.0.48/bella_companion/simulations/figures/__pycache__/fbd_2traits.cpython-310.pyc +0 -0
  50. bella_companion-0.0.48/bella_companion/simulations/figures/__pycache__/fbd_no_traits.cpython-310.pyc +0 -0
  51. bella_companion-0.0.48/bella_companion/simulations/figures/__pycache__/scenarios.cpython-310.pyc +0 -0
  52. bella_companion-0.0.48/bella_companion/simulations/figures/__pycache__/utils.cpython-310.pyc +0 -0
  53. bella_companion-0.0.48/bella_companion/simulations/scenarios/__pycache__/__init__.cpython-310.pyc +0 -0
  54. bella_companion-0.0.48/bella_companion/simulations/scenarios/__pycache__/common.cpython-310.pyc +0 -0
  55. bella_companion-0.0.48/bella_companion/simulations/scenarios/__pycache__/epi_multitype.cpython-310.pyc +0 -0
  56. bella_companion-0.0.48/bella_companion/simulations/scenarios/__pycache__/epi_skyline.cpython-310.pyc +0 -0
  57. bella_companion-0.0.48/bella_companion/simulations/scenarios/__pycache__/fbd_2traits.cpython-310.pyc +0 -0
  58. bella_companion-0.0.48/bella_companion/simulations/scenarios/__pycache__/fbd_no_traits.cpython-310.pyc +0 -0
  59. bella_companion-0.0.48/bella_companion/simulations/scenarios/__pycache__/scenario.cpython-310.pyc +0 -0
  60. bella_companion-0.0.48/bella_companion/utils/__pycache__/__init__.cpython-310.pyc +0 -0
  61. bella_companion-0.0.48/bella_companion/utils/__pycache__/beast.cpython-310.pyc +0 -0
  62. bella_companion-0.0.48/bella_companion/utils/__pycache__/explain.cpython-310.pyc +0 -0
  63. bella_companion-0.0.48/bella_companion/utils/__pycache__/slurm.cpython-310.pyc +0 -0
  64. bella_companion-0.0.48/bella_companion/utils/explain/__pycache__/__init__.cpython-310.pyc +0 -0
  65. bella_companion-0.0.48/bella_companion/utils/explain/__pycache__/pdp.cpython-310.pyc +0 -0
  66. bella_companion-0.0.48/bella_companion/utils/explain/__pycache__/shap.cpython-310.pyc +0 -0
  67. bella_companion-0.0.48/bella_companion/utils/explain/__pycache__/typeguards.cpython-310.pyc +0 -0
  68. bella_companion-0.0.48/bella_companion.egg-info/PKG-INFO +0 -12
  69. bella_companion-0.0.48/bella_companion.egg-info/SOURCES.txt +0 -121
  70. bella_companion-0.0.48/bella_companion.egg-info/dependency_links.txt +0 -1
  71. bella_companion-0.0.48/bella_companion.egg-info/entry_points.txt +0 -2
  72. bella_companion-0.0.48/bella_companion.egg-info/requires.txt +0 -6
  73. bella_companion-0.0.48/bella_companion.egg-info/top_level.txt +0 -1
  74. bella_companion-0.0.48/setup.cfg +0 -4
  75. {bella_companion-0.0.48 → bella_companion-0.1.1}/README.md +0 -0
  76. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/BELLA.jar +0 -0
  77. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/__init__.py +0 -0
  78. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/cli.py +0 -0
  79. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/eucovid/__init__.py +0 -0
  80. /bella_companion-0.0.48/bella_companion/eucovid/data/predictors/changetimes_flights_4e.csv → /bella_companion-0.1.1/src/bella_companion/eucovid/data/changetimes.csv +0 -0
  81. /bella_companion-0.0.48/bella_companion/eucovid/data/predictors/flight_pop_x_4e_ls.csv → /bella_companion-0.1.1/src/bella_companion/eucovid/data/flights.csv +0 -0
  82. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/eucovid/data/msa.fasta +0 -0
  83. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/features.py +0 -0
  84. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/platyrrhine/__init__.py +0 -0
  85. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/platyrrhine/beast_config.xml +0 -0
  86. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/platyrrhine/data/change_times.csv +0 -0
  87. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/platyrrhine/data/traits.csv +0 -0
  88. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/platyrrhine/data/trees.nwk +0 -0
  89. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/platyrrhine/results.py +0 -0
  90. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/platyrrhine/run_beast.py +0 -0
  91. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/platyrrhine/summarize.py +0 -0
  92. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/__init__.py +0 -0
  93. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/epi-multitype/GLM.xml +0 -0
  94. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/epi-multitype/MLP.xml +0 -0
  95. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/epi-multitype/Nonparametric.xml +0 -0
  96. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/epi-skyline/GLM.xml +0 -0
  97. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/epi-skyline/MLP.xml +0 -0
  98. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/epi-skyline/Nonparametric.xml +0 -0
  99. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/fbd-2traits/GLM.xml +0 -0
  100. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/fbd-2traits/MLP.xml +0 -0
  101. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/fbd-2traits/Nonparametric.xml +0 -0
  102. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/fbd-no-traits/GLM.xml +0 -0
  103. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/fbd-no-traits/MLP.xml +0 -0
  104. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/fbd-no-traits/Nonparametric.xml +0 -0
  105. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/figures/__init__.py +0 -0
  106. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/figures/epi_skyline.py +0 -0
  107. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/figures/fbd_no_traits.py +0 -0
  108. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/figures/scenarios.py +0 -0
  109. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/figures/utils.py +0 -0
  110. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/generate_data.py +0 -0
  111. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/generate_figures.py +0 -0
  112. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/metrics.py +0 -0
  113. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/run_beast.py +0 -0
  114. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/scenarios/__init__.py +0 -0
  115. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/scenarios/common.py +0 -0
  116. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/scenarios/epi_multitype.py +0 -0
  117. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/scenarios/epi_skyline.py +0 -0
  118. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/scenarios/fbd_2traits.py +0 -0
  119. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/scenarios/fbd_no_traits.py +0 -0
  120. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/scenarios/scenario.py +0 -0
  121. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/summarize.py +0 -0
  122. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/utils/__init__.py +0 -0
  123. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/utils/explain/__init__.py +0 -0
  124. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/utils/slurm.py +0 -0
  125. {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/version.xml +0 -0
@@ -1,12 +1,15 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.3
2
2
  Name: bella-companion
3
- Version: 0.0.48
3
+ Version: 0.1.1
4
4
  Summary: Bayesian Evolutionary Layered Learning Architectures (BELLA) companion
5
- Requires-Python: >=3.10
6
- Description-Content-Type: text/markdown
5
+ Author: gabriele-marino
6
+ Author-email: gabriele-marino <gabmarino.8601@gmail.com>
7
7
  Requires-Dist: arviz>=0.22.0
8
- Requires-Dist: bella-lumiere>=0.0.19
8
+ Requires-Dist: bella-lumiere>=0.1.0
9
9
  Requires-Dist: dotenv>=0.9.9
10
10
  Requires-Dist: phylogenie>=3.1.4
11
11
  Requires-Dist: poetry>=2.2.1
12
12
  Requires-Dist: seaborn>=0.13.2
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown
15
+
@@ -1,18 +1,28 @@
1
1
  [project]
2
2
  name = "bella-companion"
3
- version = "0.0.48"
3
+ version = "0.1.1"
4
4
  description = "Bayesian Evolutionary Layered Learning Architectures (BELLA) companion"
5
5
  readme = "README.md"
6
+ authors = [
7
+ { name = "gabriele-marino", email = "gabmarino.8601@gmail.com" }
8
+ ]
6
9
  requires-python = ">=3.10"
7
10
  dependencies = [
8
11
  "arviz>=0.22.0",
9
- "bella-lumiere>=0.0.19",
12
+ "bella-lumiere>=0.1.0",
10
13
  "dotenv>=0.9.9",
11
14
  "phylogenie>=3.1.4",
12
15
  "poetry>=2.2.1",
13
16
  "seaborn>=0.13.2",
14
17
  ]
15
18
 
19
+ [project.scripts]
20
+ bella = "bella_companion.cli:main"
21
+
22
+ [build-system]
23
+ requires = ["uv_build>=0.9.5,<0.10.0"]
24
+ build-backend = "uv_build"
25
+
16
26
  [dependency-groups]
17
27
  dev = [
18
28
  "joblib-stubs>=1.5.2.0.20250831",
@@ -22,13 +32,3 @@ dev = [
22
32
  [tool.pyright]
23
33
  typeCheckingMode = "strict"
24
34
 
25
- [project.scripts]
26
- bella = "bella_companion.cli:main"
27
-
28
- [build-system]
29
- requires = ["setuptools>=42"]
30
- build-backend = "setuptools.build_meta"
31
-
32
- [tool.setuptools]
33
- packages = ["bella_companion"]
34
-
@@ -48,7 +48,7 @@
48
48
  <populationModel spec="ConstantPopulation" popSize="0.1"/>
49
49
  </stateNode>
50
50
  <stateNode id="Re" spec="RealParameter" value="1.0 1.1 1.2 1.3 1.4 1.01 1.1 1.2 1.3 1.4"/>
51
- <stateNode id="samplingProportion" spec="RealParameter" value="1.11E-5 1.2E-5 1.3E-5 1.4E-5 1.5E-5 1.1E-5 1.2E-5 1.3E-5 1.4E-5 1.5E-5 0.0 0.0 0.0 0.0 0.0"/>
51
+ <stateNode id="samplingProportion" spec="RealParameter" value="1.1E-4 1.2E-4 1.3E-4 1.4E-4 1.5E-4 1.11E-4 1.2E-4 1.3E-4 1.4E-4 1.5E-4 0.0 0.0 0.0 0.0 0.0"/>
52
52
  <stateNode id="migrationRateW" spec="RealParameter" value="0"/>
53
53
  <stateNode id="migrationRateScaler" spec="RealParameter" value="0.1"/>
54
54
  <stateNode id="processLength" spec="RealParameter" value="10.0"/>
@@ -76,9 +76,7 @@
76
76
  <becomeUninfectiousRate spec="SkylineVectorParameter" skylineValues="36.5" typeSet="@typeSet"/>
77
77
  <migrationRate id="migrationRateSP" spec="SkylineMatrixParameter" timesAreAges="true" processLength="@processLength" typeSet="@typeSet">
78
78
  <skylineValues spec="glmprior.util.GLMLogLinear" coefficients="@migrationRateW" scaleFactor="@migrationRateScaler" transform="false">
79
- <plate var="predictorFile" range="$(predictorFiles)">
80
- <predictor spec="RealParameterFromXSV" fileName="$(predictorFile)"/>
81
- </plate>
79
+ <predictor spec="RealParameterFromXSV" fileName="$(flightsPredictorFile)"/>
82
80
  <indicators spec="BooleanParameter" value="1"/>
83
81
  </skylineValues>
84
82
  <changeTimes spec="RealParameterFromXSV" fileName="$(changeTimesFile)"/>
@@ -94,26 +92,37 @@
94
92
  <distribution spec="SmartZeroExcludingPrior" x="@Re">
95
93
  <LogNormal name="distr" M="0.8" S="0.5"/>
96
94
  </distribution>
97
- <distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.2E-5 1.3E-5 1.4E-5 1.5E-5">
98
- <Uniform name="distr" lower="0" upper="0.15"/>
95
+
96
+ <!-- Sampling proportion in China -->
97
+ <distribution spec="SmartZeroExcludingPrior" x="@samplingProportionValues" classesToExclude="1.1E-4 1.2E-4 1.3E-4 1.4E-4 1.5E-4">
98
+ <Uniform name="distr" upper="0.024714828897338403"/>
99
+ </distribution>
100
+ <!-- Sampling proportion in China -->
101
+ <distribution spec="SmartZeroExcludingPrior" x="@samplingProportionValues" classesToExclude="1.11E-4 1.2E-4 1.3E-4 1.4E-4 1.5E-4">
102
+ <Uniform name="distr" upper="$1.8682742128337982e-4"/>
99
103
  </distribution>
100
- <distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.1E-5 1.3E-5 1.4E-5 1.5E-5">
101
- <Uniform name="distr" lower="0" upper="0.093"/>
104
+ <!-- Sampling proportion in France -->
105
+ <distribution spec="SmartZeroExcludingPrior" x="@samplingProportionValues" classesToExclude="1.1E-4 1.11E-4 1.3E-4 1.4E-4 1.5E-4">
106
+ <Uniform name="distr" upper="0.09217877094972067"/>
102
107
  </distribution>
103
- <distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.1E-5 1.2E-5 1.4E-5 1.5E-5">
104
- <Uniform name="distr" lower="0" upper="0.10"/>
108
+ <!-- Sampling proportion in Germany -->
109
+ <distribution spec="SmartZeroExcludingPrior" x="@samplingProportionValues" classesToExclude="1.1E-4 1.11E-4 1.2E-4 1.4E-4 1.5E-4">
110
+ <Uniform name="distr" upper="0.01770956316410862"/>
105
111
  </distribution>
106
- <distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.1E-5 1.2E-5 1.3E-5 1.5E-5">
107
- <Uniform name="distr" lower="0" upper="0.005"/>
112
+ <!-- Sampling proportion in Germany -->
113
+ <distribution spec="SmartZeroExcludingPrior" x="@samplingProportionValues" classesToExclude="1.1E-4 1.11E-4 1.2E-4 1.3E-4 1.5E-4">
114
+ <Uniform name="distr" upper="0.002209756926738059"/>
108
115
  </distribution>
109
- <distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.1E-5 1.2E-5 1.3E-5 1.4E-5">
110
- <Uniform name="distr" lower="0" upper="0.057"/>
116
+ <!-- Sampling proportion in EU -->
117
+ <distribution spec="SmartZeroExcludingPrior" x="@samplingProportionValues" classesToExclude="1.1E-4 1.11E-4 1.2E-4 1.3E-4 1.4E-4">
118
+ <Uniform name="distr" lower="0" upper="0.012770137524557957"/>
111
119
  </distribution>
120
+
112
121
  <prior name="distribution" x="@migrationRateW">
113
122
  <Normal name="distr" mean="0.0" sigma="1.0"/>
114
123
  </prior>
115
124
  <prior name="distribution" x="@migrationRateScaler">
116
- <LogNormal name="distr" M="0.0" S="0.8"/>
125
+ <LogNormal name="distr" M="0.0" S="1"/>
117
126
  </prior>
118
127
  <prior name="distribution" x="@gammaShape">
119
128
  <Exponential name="distr" mean="0.5"/>
@@ -136,8 +145,9 @@
136
145
  <operator spec="BactrianScaleOperator" parameter="@processLength" scaleFactor="0.25" weight="3.0"/>
137
146
  <operator spec="SmartScaleOperator" parameter="@Re" scaleFactor="0.25" weight="10.0"/>
138
147
  <operator spec="SmartScaleOperator" parameter="@samplingProportion" weight="3.0"/>
139
- <operator spec="BactrianRandomWalkOperator" parameter="@migrationRateW" weight="5.0" scaleFactor="0.1"/>
140
- <operator spec="AdaptableVarianceMultivariateNormalOperator" weight="5.0" coefficient="1.0" scaleFactor="0.5" beta="0.05" initial="800" burnin="400" every="1">
148
+ <operator spec="BactrianScaleOperator" parameter="@migrationRateScaler" scaleFactor="0.25" weight="3.0"/>
149
+ <operator spec="BactrianRandomWalkOperator" parameter="@migrationRateW" scaleFactor="0.1" weight="5.0"/>
150
+ <operator spec="AdaptableVarianceMultivariateNormalOperator" weight="5.0" scaleFactor="0.5" coefficient="1.0" beta="0.05" initial="800" burnin="400" every="1">
141
151
  <transformations spec="Transform$NoTransform" f="@migrationRateW"/>
142
152
  </operator>
143
153
  <operator spec="BactrianScaleOperator" parameter="@gammaShape" weight="1.0"/>
@@ -77,12 +77,11 @@
77
77
  <becomeUninfectiousRate spec="SkylineVectorParameter" skylineValues="36.5" typeSet="@typeSet"/>
78
78
  <migrationRate id="migrationRateSP" spec="SkylineMatrixParameter" timesAreAges="true" processLength="@processLength" typeSet="@typeSet">
79
79
  <skylineValues id="migrationRate" spec="bella.BayesMLP" nodes="$(nodes)">
80
- <plate var="predictorFile" range="$(predictorFiles)">
81
- <predictor spec="RealParameterFromXSV" fileName="$(predictorFile)"/>
82
- </plate>
80
+ <predictor spec="RealParameterFromXSV" fileName="$(flightsPredictorFile)"/>
83
81
  <plate var="n" range="$(layersRange)">
84
82
  <weights idref="migrationRateW$(n)"/>
85
83
  </plate>
84
+ <activationFunctionsOutput spec="bella.SoftPlus"/>
86
85
  </skylineValues>
87
86
  <changeTimes spec="RealParameterFromXSV" fileName="$(changeTimesFile)"/>
88
87
  </migrationRate>
@@ -0,0 +1,36 @@
1
+ import os
2
+ from itertools import product
3
+ from pathlib import Path
4
+
5
+ from bella_companion.utils import submit_job
6
+
7
+
8
+ def run_beast():
9
+ base_output_dir = Path(os.environ["BELLA_BEAST_OUTPUT_DIR"])
10
+ output_dir = base_output_dir / "eucovid"
11
+ os.makedirs(output_dir, exist_ok=True)
12
+
13
+ base_log_dir = Path(os.environ["BELLA_SBATCH_LOG_DIR"]) / "eucovid"
14
+ data_dir = Path(__file__).parent / "data"
15
+ beast_configs_dir = Path(__file__).parent / "beast_configs"
16
+
17
+ for seed, model in product(range(3), ["GLM", "MLP"]):
18
+ extra_data = '-D layersRange="0,1,2",nodes="16 8"' if model == "MLP" else ""
19
+ os.makedirs(output_dir / model, exist_ok=True)
20
+ submit_job(
21
+ " ".join(
22
+ [
23
+ *os.environ["BELLA_RUN_BEAST_CMD"],
24
+ f"-seed {seed}",
25
+ f"-D msa_file={data_dir / 'msa.fasta'}",
26
+ f"-D changeTimesFile={data_dir / 'changetimes.csv'}",
27
+ f"-D flightsPredictorFile={data_dir / 'flights.csv'}",
28
+ extra_data,
29
+ f"-prefix {output_dir / model}{os.sep}{seed}-",
30
+ str(beast_configs_dir / f"{model}.xml"),
31
+ ]
32
+ ),
33
+ base_log_dir / model / str(seed),
34
+ cpus=128,
35
+ mem_per_cpu=12000,
36
+ )
@@ -6,7 +6,7 @@ import joblib
6
6
  import matplotlib.pyplot as plt
7
7
  import numpy as np
8
8
  import polars as pl
9
- from lumiere.backend import relu, sigmoid
9
+ from bella_lumiere.backend import relu, sigmoid
10
10
 
11
11
  from bella_companion.simulations.scenarios.epi_multitype import (
12
12
  MIGRATION_PREDICTOR,
@@ -6,7 +6,7 @@ import joblib
6
6
  import matplotlib.pyplot as plt
7
7
  import numpy as np
8
8
  import polars as pl
9
- from lumiere.backend import relu, sigmoid
9
+ from bella_lumiere.backend import relu, sigmoid
10
10
 
11
11
  from bella_companion.simulations.figures.utils import step
12
12
  from bella_companion.simulations.scenarios.fbd_2traits import (
@@ -7,9 +7,9 @@ from typing import Any
7
7
  import arviz as az
8
8
  import numpy as np
9
9
  import polars as pl
10
+ from bella_lumiere import read_log_file, read_weights
11
+ from bella_lumiere.typing import Weights
10
12
  from joblib import Parallel, delayed
11
- from lumiere import read_log_file, read_weights
12
- from lumiere.typing import Weights
13
13
  from tqdm import tqdm
14
14
 
15
15
  from bella_companion.utils.slurm import get_job_metadata
@@ -1,13 +1,15 @@
1
1
  import os
2
2
  from functools import partial
3
+ from itertools import product
3
4
  from pathlib import Path
4
5
 
5
6
  import matplotlib.pyplot as plt
6
7
  import numpy as np
7
8
  import seaborn as sns
9
+ from bella_lumiere import get_partial_dependence_values
10
+ from bella_lumiere.typing import ActivationFunction, Weights
8
11
  from joblib import Parallel, delayed
9
- from lumiere import get_partial_dependence_values
10
- from lumiere.typing import ActivationFunction, ArrayLike, Weights
12
+ from numpy.typing import ArrayLike
11
13
  from tqdm import tqdm
12
14
 
13
15
  import bella_companion.utils.explain.typeguards as tg
@@ -24,6 +26,7 @@ def _get_median_partial_dependence_values(
24
26
  pdvalues = [
25
27
  get_partial_dependence_values(
26
28
  weights=w,
29
+ inputs=inputs,
27
30
  features_grid=features_grid,
28
31
  hidden_activation=hidden_activation,
29
32
  output_activation=output_activation,
@@ -42,6 +45,7 @@ def plot_partial_dependencies(
42
45
  output_dir: str | Path,
43
46
  hidden_activation: ActivationFunction,
44
47
  output_activation: ActivationFunction,
48
+ inputs: ArrayLike | None = None,
45
49
  ):
46
50
  output_dir = Path(output_dir)
47
51
  os.makedirs(output_dir, exist_ok=True)
@@ -51,6 +55,8 @@ def plot_partial_dependencies(
51
55
  [0, 1] if feature.is_binary else continuous_grid
52
56
  for feature in features.values()
53
57
  ]
58
+ if inputs is None:
59
+ inputs = list(product(*features_grid))
54
60
 
55
61
  if tg.is_weights_list(weights):
56
62
  func = get_partial_dependence_values
@@ -65,6 +71,7 @@ def plot_partial_dependencies(
65
71
  delayed(
66
72
  partial(
67
73
  func,
74
+ inputs=inputs,
68
75
  features_grid=features_grid,
69
76
  hidden_activation=hidden_activation,
70
77
  output_activation=output_activation,
@@ -99,11 +106,11 @@ def plot_partial_dependencies(
99
106
  plt.plot( # pyright: ignore
100
107
  continuous_grid, median, color=feature.color, label=label
101
108
  )
102
- plt.xlabel("Feature value") # pyright: ignore
103
- plt.ylabel("MLP Output") # pyright: ignore
104
- plt.legend() # pyright: ignore
105
- plt.savefig(output_dir / "PDPs-continuous.svg") # pyright: ignore
106
- plt.close()
109
+ plt.xlabel("Feature value") # pyright: ignore
110
+ plt.ylabel("MLP Output") # pyright: ignore
111
+ plt.legend() # pyright: ignore
112
+ plt.savefig(output_dir / f"PDPs-continuous-{label}.svg") # pyright: ignore
113
+ plt.close()
107
114
 
108
115
  if any(f.is_binary for f in features.values()):
109
116
  data: list[float] = []
@@ -6,9 +6,9 @@ from typing import Callable
6
6
  import matplotlib.pyplot as plt
7
7
  import numpy as np
8
8
  import seaborn as sns
9
+ from bella_lumiere import get_shap_features_importance
10
+ from bella_lumiere.typing import ActivationFunction, Array, Weights
9
11
  from joblib import Parallel, delayed
10
- from lumiere import get_shap_features_importance
11
- from lumiere.typing import ActivationFunction, Array, Weights
12
12
  from numpy.typing import ArrayLike
13
13
  from tqdm import tqdm
14
14
 
@@ -68,13 +68,15 @@ def plot_shap_features_importance(
68
68
  output_file: str | Path,
69
69
  hidden_activation: ActivationFunction,
70
70
  output_activation: ActivationFunction,
71
+ inputs: ArrayLike | None = None,
71
72
  ):
72
- continuous_grid: list[float] = np.linspace(0, 1, 10).tolist()
73
- features_grid: list[list[float]] = [
74
- [0, 1] if feature.is_binary else continuous_grid
75
- for feature in features.values()
76
- ]
77
- inputs = list(product(*features_grid))
73
+ if inputs is None:
74
+ continuous_grid: list[float] = np.linspace(0, 1, 10).tolist()
75
+ features_grid: list[list[float]] = [
76
+ [0, 1] if feature.is_binary else continuous_grid
77
+ for feature in features.values()
78
+ ]
79
+ inputs = list(product(*features_grid))
78
80
 
79
81
  if tg.is_weights_list(weights):
80
82
  func = get_shap_features_importance
@@ -1,7 +1,7 @@
1
1
  from typing import Any, TypeGuard
2
2
 
3
3
  import numpy as np
4
- from lumiere.typing import Weights
4
+ from bella_lumiere.typing import Weights
5
5
 
6
6
 
7
7
  def is_list(obj: Any) -> TypeGuard[list[Any]]: