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.
- {bella_companion-0.0.48 → bella_companion-0.1.1}/PKG-INFO +8 -5
- {bella_companion-0.0.48 → bella_companion-0.1.1}/pyproject.toml +12 -12
- bella_companion-0.1.1/src/bella_companion/.DS_Store +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/eucovid/beast_configs/GLM.xml +27 -17
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/eucovid/beast_configs/MLP.xml +2 -3
- bella_companion-0.1.1/src/bella_companion/eucovid/run_beast.py +36 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/figures/epi_multitype.py +1 -1
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/figures/fbd_2traits.py +1 -1
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/utils/beast.py +2 -2
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/utils/explain/pdp.py +14 -7
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/utils/explain/shap.py +10 -8
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/utils/explain/typeguards.py +1 -1
- bella_companion-0.0.48/bella_companion/__pycache__/__init__.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/__pycache__/cli.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/__pycache__/features.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/eucovid/__pycache__/__init__.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/eucovid/__pycache__/run_beast.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/eucovid/beast_configs/Nonparametric.xml +0 -399
- bella_companion-0.0.48/bella_companion/eucovid/data/case_data.csv +0 -346
- bella_companion-0.0.48/bella_companion/eucovid/data/change_dates.csv +0 -8
- bella_companion-0.0.48/bella_companion/eucovid/data/osi.csv +0 -376
- bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/closedborders_7e_nt.csv +0 -35
- bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/dist_7e_ls.csv +0 -35
- bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/flight_7e_ls.csv +0 -35
- bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/flight_pop_x_7e_ls.csv +0 -35
- bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/osi_x_7e_ls.csv +0 -35
- bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/osi_y_7e_ls.csv +0 -35
- bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/pop_x_7e_ls.csv +0 -35
- bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/pop_y_7e_ls.csv +0 -35
- bella_companion-0.0.48/bella_companion/eucovid/data/predictors/all/sharedborders_7e_nt.csv +0 -35
- bella_companion-0.0.48/bella_companion/eucovid/data/predictors/changetimes_all_7e.csv +0 -6
- bella_companion-0.0.48/bella_companion/eucovid/run_beast.py +0 -130
- bella_companion-0.0.48/bella_companion/platyrrhine/__pycache__/__init__.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/platyrrhine/__pycache__/results.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/platyrrhine/__pycache__/run_beast.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/platyrrhine/__pycache__/summarize.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/platyrrhine/__pycache__/summarize_logs.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/__pycache__/__init__.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/__pycache__/features.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/__pycache__/generate_data.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/__pycache__/generate_figures.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/__pycache__/metrics.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/__pycache__/run_beast.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/__pycache__/summarize.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/__pycache__/summarize_logs.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/figures/__pycache__/__init__.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/figures/__pycache__/epi_multitype.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/figures/__pycache__/epi_skyline.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/figures/__pycache__/fbd_2traits.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/figures/__pycache__/fbd_no_traits.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/figures/__pycache__/scenarios.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/figures/__pycache__/utils.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/scenarios/__pycache__/__init__.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/scenarios/__pycache__/common.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/scenarios/__pycache__/epi_multitype.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/scenarios/__pycache__/epi_skyline.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/scenarios/__pycache__/fbd_2traits.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/scenarios/__pycache__/fbd_no_traits.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/simulations/scenarios/__pycache__/scenario.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/utils/__pycache__/__init__.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/utils/__pycache__/beast.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/utils/__pycache__/explain.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/utils/__pycache__/slurm.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/utils/explain/__pycache__/__init__.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/utils/explain/__pycache__/pdp.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/utils/explain/__pycache__/shap.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion/utils/explain/__pycache__/typeguards.cpython-310.pyc +0 -0
- bella_companion-0.0.48/bella_companion.egg-info/PKG-INFO +0 -12
- bella_companion-0.0.48/bella_companion.egg-info/SOURCES.txt +0 -121
- bella_companion-0.0.48/bella_companion.egg-info/dependency_links.txt +0 -1
- bella_companion-0.0.48/bella_companion.egg-info/entry_points.txt +0 -2
- bella_companion-0.0.48/bella_companion.egg-info/requires.txt +0 -6
- bella_companion-0.0.48/bella_companion.egg-info/top_level.txt +0 -1
- bella_companion-0.0.48/setup.cfg +0 -4
- {bella_companion-0.0.48 → bella_companion-0.1.1}/README.md +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/BELLA.jar +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/__init__.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/cli.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/eucovid/__init__.py +0 -0
- /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
- /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
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/eucovid/data/msa.fasta +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/features.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/platyrrhine/__init__.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/platyrrhine/beast_config.xml +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/platyrrhine/data/change_times.csv +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/platyrrhine/data/traits.csv +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/platyrrhine/data/trees.nwk +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/platyrrhine/results.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/platyrrhine/run_beast.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/platyrrhine/summarize.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/__init__.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/epi-multitype/GLM.xml +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/epi-multitype/MLP.xml +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/epi-multitype/Nonparametric.xml +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/epi-skyline/GLM.xml +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/epi-skyline/MLP.xml +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/epi-skyline/Nonparametric.xml +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/fbd-2traits/GLM.xml +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/fbd-2traits/MLP.xml +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/fbd-2traits/Nonparametric.xml +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/fbd-no-traits/GLM.xml +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/fbd-no-traits/MLP.xml +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/beast_configs/fbd-no-traits/Nonparametric.xml +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/figures/__init__.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/figures/epi_skyline.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/figures/fbd_no_traits.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/figures/scenarios.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/figures/utils.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/generate_data.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/generate_figures.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/metrics.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/run_beast.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/scenarios/__init__.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/scenarios/common.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/scenarios/epi_multitype.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/scenarios/epi_skyline.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/scenarios/fbd_2traits.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/scenarios/fbd_no_traits.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/scenarios/scenario.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/simulations/summarize.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/utils/__init__.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/utils/explain/__init__.py +0 -0
- {bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/utils/slurm.py +0 -0
- {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.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: bella-companion
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Bayesian Evolutionary Layered Learning Architectures (BELLA) companion
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
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.
|
|
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
|
|
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
|
-
|
|
Binary file
|
{bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/eucovid/beast_configs/GLM.xml
RENAMED
|
@@ -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.
|
|
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
|
-
<
|
|
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
|
-
|
|
98
|
-
|
|
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
|
-
|
|
101
|
-
|
|
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
|
-
|
|
104
|
-
|
|
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
|
-
|
|
107
|
-
|
|
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
|
-
|
|
110
|
-
|
|
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="
|
|
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="
|
|
140
|
-
<operator spec="
|
|
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"/>
|
{bella_companion-0.0.48 → bella_companion-0.1.1/src}/bella_companion/eucovid/beast_configs/MLP.xml
RENAMED
|
@@ -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
|
-
<
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
[
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|