autoemulate 2.1.0__tar.gz → 2.1.2__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.
- {autoemulate-2.1.0 → autoemulate-2.1.2}/PKG-INFO +8 -7
- {autoemulate-2.1.0 → autoemulate-2.1.2}/README.md +5 -4
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/core/compare.py +13 -15
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/core/model_selection.py +10 -8
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/core/plotting.py +14 -2
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/core/tuner.py +7 -7
- autoemulate-2.1.2/autoemulate/learners/__init__.py +8 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/transforms/base.py +0 -13
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate.egg-info/PKG-INFO +8 -7
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate.egg-info/SOURCES.txt +0 -4
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate.egg-info/requires.txt +2 -2
- {autoemulate-2.1.0 → autoemulate-2.1.2}/pyproject.toml +11 -3
- autoemulate-2.1.0/autoemulate/experimental/data/spatiotemporal_dataset.py +0 -160
- autoemulate-2.1.0/autoemulate/experimental/emulators/fno.py +0 -100
- autoemulate-2.1.0/autoemulate/experimental/emulators/spatiotemporal.py +0 -98
- autoemulate-2.1.0/autoemulate/experimental/neural_processes/conditional_neural_process.py +0 -502
- autoemulate-2.1.0/autoemulate/learners/__init__.py +0 -36
- {autoemulate-2.1.0 → autoemulate-2.1.2}/LICENSE +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/__init__.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/calibration/__init__.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/calibration/base.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/calibration/bayes.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/calibration/evidence.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/calibration/history_matching.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/calibration/history_matching_dashboard.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/calibration/interval_excursion_set.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/callbacks/early_stopping.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/core/__init__.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/core/device.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/core/logging_config.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/core/metrics.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/core/reinitialize.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/core/results.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/core/save.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/core/sensitivity_analysis.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/core/types.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/data/utils.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/__init__.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac1/description.md +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac1/processed/outputs.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac1/processed/parameters.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac1/raw/outputs.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac1/raw/parameters.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac2/description.md +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac2/processed/outputs.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac2/processed/parameters.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac2/raw/outputs.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac2/raw/parameters.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac3/description.md +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac3/processed/outputs.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac3/processed/parameters.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac3/raw/outputs.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac3/raw/parameters.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac4/description.md +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac4/processed/outputs.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac4/processed/parameters.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac4/raw/outputs.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac4/raw/parameters.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac5/description.md +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac5/processed/outputs.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac5/processed/parameters.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac5/raw/passive_mechanics/outputs.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac5/raw/passive_mechanics/parameters.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac5/raw/passive_mechanics.tar.xz +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac6/description.md +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac6/processed/outputs.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac6/processed/parameters.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac6/raw/outputs.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/cardiac6/raw/parameters.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/climate1/description.md +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/climate1/processed/outputs.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/climate1/processed/parameters.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/climate1/raw/Holden2018.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/datasets.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/engineering1/description.md +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/engineering1/processed/outputs.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/engineering1/processed/parameters.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/engineering1/raw/Nervi_truss_datasets.zip +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/engineering1/raw/datasets/Sobol_CSV_data_1000.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/reactiondiffusion1/processed/outputs.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/datasets/reactiondiffusion1/processed/parameters.csv +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/__init__.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/base.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/ensemble.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/gaussian_process/__init__.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/gaussian_process/exact.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/gaussian_process/kernel.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/gaussian_process/mean.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/gaussian_process/poly_mean.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/gradient_boosting.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/lightgbm.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/nn/__init__.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/nn/mlp.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/polynomials.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/radial_basis_functions.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/random_forest.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/registry.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/svm.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/transformed/__init__.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/transformed/base.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/emulators/transformed/delta_method.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/experimental/data/gaussian.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/experimental/emulators/nn/gaussian_mlp.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/experimental/emulators/nn/zoib.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/feature_generation/polynomial_features.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/learners/base.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/learners/membership.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/learners/pool.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/learners/stream.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/simulations/__init__.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/simulations/advection_diffusion.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/simulations/base.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/simulations/double_pendulum.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/simulations/epidemic.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/simulations/flow_problem.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/simulations/projectile.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/simulations/reaction_diffusion.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/simulations/seir.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/transforms/__init__.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/transforms/pca.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/transforms/standardize.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/transforms/utils.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate/transforms/vae.py +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate.egg-info/dependency_links.txt +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate.egg-info/not-zip-safe +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/autoemulate.egg-info/top_level.txt +0 -0
- {autoemulate-2.1.0 → autoemulate-2.1.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: autoemulate
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.2
|
|
4
4
|
Summary: A python package for semi-automated emulation
|
|
5
5
|
Author: AutoEmulate contributors (see our GitHub page)
|
|
6
6
|
License-Expression: MIT
|
|
@@ -20,7 +20,7 @@ Description-Content-Type: text/markdown
|
|
|
20
20
|
License-File: LICENSE
|
|
21
21
|
Requires-Dist: matplotlib>=3.7.2
|
|
22
22
|
Requires-Dist: seaborn>=0.12.2
|
|
23
|
-
Requires-Dist: scikit-learn
|
|
23
|
+
Requires-Dist: scikit-learn>=1.3.0
|
|
24
24
|
Requires-Dist: pandas>=2.1
|
|
25
25
|
Requires-Dist: torch>=2.1.0
|
|
26
26
|
Requires-Dist: scipy>=1.11.3
|
|
@@ -36,7 +36,7 @@ Requires-Dist: anytree>=2.12.1
|
|
|
36
36
|
Requires-Dist: torchmetrics>=1.7.1
|
|
37
37
|
Requires-Dist: pyro-ppl>=1.9.1
|
|
38
38
|
Requires-Dist: torchrbf>=0.0.1
|
|
39
|
-
Requires-Dist: arviz
|
|
39
|
+
Requires-Dist: arviz<1.0,>=0.21.0
|
|
40
40
|
Requires-Dist: getdist>=1.7.2
|
|
41
41
|
Requires-Dist: einops>=0.8.1
|
|
42
42
|
Requires-Dist: harmonic>=1.3.0
|
|
@@ -87,7 +87,7 @@ You can find the project documentation [here](https://alan-turing-institute.gith
|
|
|
87
87
|
|
|
88
88
|
- The AutoEmulate project is run out of the [Alan Turing Institute](https://www.turing.ac.uk/).
|
|
89
89
|
- Visit [autoemulate.com](https://www.autoemulate.com/) to learn more.
|
|
90
|
-
- Feel free to reach out to us at [
|
|
90
|
+
- Feel free to reach out to us at [aiphys@turing.ac.uk](mailto:aiphys@turing.ac.uk) for queries about AutoEmulate or ideas for collaboration.
|
|
91
91
|
- We have also published a paper in [The Journal of Open Source Software](https://joss.theoj.org/papers/10.21105/joss.07626).
|
|
92
92
|
|
|
93
93
|
Please cite this paper if you use the package in your work:
|
|
@@ -137,14 +137,15 @@ You can find the project documentation [here](https://alan-turing-institute.gith
|
|
|
137
137
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/vchhabra-turing"><img src="https://avatars.githubusercontent.com/u/140401853?v=4?s=100" width="100px;" alt="vchhabra-turing"/><br /><sub><b>vchhabra-turing</b></sub></a><br /><a href="#ideas-vchhabra-turing" title="Ideas, Planning, & Feedback">🤔</a></td>
|
|
138
138
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/era-23"><img src="https://avatars.githubusercontent.com/u/115151590?v=4?s=100" width="100px;" alt="Ethan Attwood"/><br /><sub><b>Ethan Attwood</b></sub></a><br /><a href="#bug-era-23" title="Bug reports">🐛</a></td>
|
|
139
139
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/TheCSGuy25"><img src="https://avatars.githubusercontent.com/u/87066683?v=4?s=100" width="100px;" alt="__aar0n__.py"/><br /><sub><b>__aar0n__.py</b></sub></a><br /><a href="#code-TheCSGuy25" title="Code">💻</a></td>
|
|
140
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SyedHaider2084"><img src="https://avatars.githubusercontent.com/u/227389830?v=4?s=100" width="100px;" alt="SyedHaider2084"/><br /><sub><b>SyedHaider2084</b></sub></a><br /><a href="#code-SyedHaider2084" title="Code">💻</a></td>
|
|
140
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SyedHaider2084"><img src="https://avatars.githubusercontent.com/u/227389830?v=4?s=100" width="100px;" alt="SyedHaider2084"/><br /><sub><b>SyedHaider2084</b></sub></a><br /><a href="#code-SyedHaider2084" title="Code">💻</a> <a href="#doc-SyedHaider2084" title="Documentation">📖</a></td>
|
|
141
141
|
</tr>
|
|
142
142
|
<tr>
|
|
143
143
|
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/lcm98/"><img src="https://avatars.githubusercontent.com/u/102757707?v=4?s=100" width="100px;" alt="Loh Chun Mun"/><br /><sub><b>Loh Chun Mun</b></sub></a><br /><a href="#doc-cmsamaaa" title="Documentation">📖</a> <a href="#code-cmsamaaa" title="Code">💻</a></td>
|
|
144
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/z7076"><img src="https://avatars.githubusercontent.com/u/69681924?v=4?s=100" width="100px;" alt="Jichen Zhang"/><br /><sub><b>Jichen Zhang</b></sub></a><br /><a href="#code-z7076" title="Code">💻</a></td>
|
|
145
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/RemDelaporteMathurin"><img src="https://avatars.githubusercontent.com/u/40028739?v=4?s=100" width="100px;" alt="Rémi Delaporte-Mathurin"/><br /><sub><b>Rémi Delaporte-Mathurin</b></sub></a><br /><a href="#bug-RemDelaporteMathurin" title="Bug reports">🐛</a></td>
|
|
144
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/z7076"><img src="https://avatars.githubusercontent.com/u/69681924?v=4?s=100" width="100px;" alt="Jichen Zhang"/><br /><sub><b>Jichen Zhang</b></sub></a><br /><a href="#code-z7076" title="Code">💻</a> <a href="#doc-z7076" title="Documentation">📖</a></td>
|
|
145
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/RemDelaporteMathurin"><img src="https://avatars.githubusercontent.com/u/40028739?v=4?s=100" width="100px;" alt="Rémi Delaporte-Mathurin"/><br /><sub><b>Rémi Delaporte-Mathurin</b></sub></a><br /><a href="#bug-RemDelaporteMathurin" title="Bug reports">🐛</a> <a href="#doc-RemDelaporteMathurin" title="Documentation">📖</a></td>
|
|
146
146
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/pmeier"><img src="https://avatars.githubusercontent.com/u/6849766?v=4?s=100" width="100px;" alt="Philip Meier"/><br /><sub><b>Philip Meier</b></sub></a><br /><a href="#bug-pmeier" title="Bug reports">🐛</a></td>
|
|
147
147
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/penelopeysm"><img src="https://avatars.githubusercontent.com/u/122629585?v=4?s=100" width="100px;" alt="Penelope Yong"/><br /><sub><b>Penelope Yong</b></sub></a><br /><a href="#ideas-penelopeysm" title="Ideas, Planning, & Feedback">🤔</a> <a href="#review-penelopeysm" title="Reviewed Pull Requests">👀</a> <a href="#code-penelopeysm" title="Code">💻</a> <a href="#doc-penelopeysm" title="Documentation">📖</a></td>
|
|
148
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ykd007"><img src="https://avatars.githubusercontent.com/u/79036688?v=4?s=100" width="100px;" alt="Yash Dhawan"/><br /><sub><b>Yash Dhawan</b></sub></a><br /><a href="#doc-ykd007" title="Documentation">📖</a></td>
|
|
148
149
|
</tr>
|
|
149
150
|
</tbody>
|
|
150
151
|
</table>
|
|
@@ -19,7 +19,7 @@ You can find the project documentation [here](https://alan-turing-institute.gith
|
|
|
19
19
|
|
|
20
20
|
- The AutoEmulate project is run out of the [Alan Turing Institute](https://www.turing.ac.uk/).
|
|
21
21
|
- Visit [autoemulate.com](https://www.autoemulate.com/) to learn more.
|
|
22
|
-
- Feel free to reach out to us at [
|
|
22
|
+
- Feel free to reach out to us at [aiphys@turing.ac.uk](mailto:aiphys@turing.ac.uk) for queries about AutoEmulate or ideas for collaboration.
|
|
23
23
|
- We have also published a paper in [The Journal of Open Source Software](https://joss.theoj.org/papers/10.21105/joss.07626).
|
|
24
24
|
|
|
25
25
|
Please cite this paper if you use the package in your work:
|
|
@@ -69,14 +69,15 @@ You can find the project documentation [here](https://alan-turing-institute.gith
|
|
|
69
69
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/vchhabra-turing"><img src="https://avatars.githubusercontent.com/u/140401853?v=4?s=100" width="100px;" alt="vchhabra-turing"/><br /><sub><b>vchhabra-turing</b></sub></a><br /><a href="#ideas-vchhabra-turing" title="Ideas, Planning, & Feedback">🤔</a></td>
|
|
70
70
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/era-23"><img src="https://avatars.githubusercontent.com/u/115151590?v=4?s=100" width="100px;" alt="Ethan Attwood"/><br /><sub><b>Ethan Attwood</b></sub></a><br /><a href="#bug-era-23" title="Bug reports">🐛</a></td>
|
|
71
71
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/TheCSGuy25"><img src="https://avatars.githubusercontent.com/u/87066683?v=4?s=100" width="100px;" alt="__aar0n__.py"/><br /><sub><b>__aar0n__.py</b></sub></a><br /><a href="#code-TheCSGuy25" title="Code">💻</a></td>
|
|
72
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SyedHaider2084"><img src="https://avatars.githubusercontent.com/u/227389830?v=4?s=100" width="100px;" alt="SyedHaider2084"/><br /><sub><b>SyedHaider2084</b></sub></a><br /><a href="#code-SyedHaider2084" title="Code">💻</a></td>
|
|
72
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SyedHaider2084"><img src="https://avatars.githubusercontent.com/u/227389830?v=4?s=100" width="100px;" alt="SyedHaider2084"/><br /><sub><b>SyedHaider2084</b></sub></a><br /><a href="#code-SyedHaider2084" title="Code">💻</a> <a href="#doc-SyedHaider2084" title="Documentation">📖</a></td>
|
|
73
73
|
</tr>
|
|
74
74
|
<tr>
|
|
75
75
|
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/lcm98/"><img src="https://avatars.githubusercontent.com/u/102757707?v=4?s=100" width="100px;" alt="Loh Chun Mun"/><br /><sub><b>Loh Chun Mun</b></sub></a><br /><a href="#doc-cmsamaaa" title="Documentation">📖</a> <a href="#code-cmsamaaa" title="Code">💻</a></td>
|
|
76
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/z7076"><img src="https://avatars.githubusercontent.com/u/69681924?v=4?s=100" width="100px;" alt="Jichen Zhang"/><br /><sub><b>Jichen Zhang</b></sub></a><br /><a href="#code-z7076" title="Code">💻</a></td>
|
|
77
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/RemDelaporteMathurin"><img src="https://avatars.githubusercontent.com/u/40028739?v=4?s=100" width="100px;" alt="Rémi Delaporte-Mathurin"/><br /><sub><b>Rémi Delaporte-Mathurin</b></sub></a><br /><a href="#bug-RemDelaporteMathurin" title="Bug reports">🐛</a></td>
|
|
76
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/z7076"><img src="https://avatars.githubusercontent.com/u/69681924?v=4?s=100" width="100px;" alt="Jichen Zhang"/><br /><sub><b>Jichen Zhang</b></sub></a><br /><a href="#code-z7076" title="Code">💻</a> <a href="#doc-z7076" title="Documentation">📖</a></td>
|
|
77
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/RemDelaporteMathurin"><img src="https://avatars.githubusercontent.com/u/40028739?v=4?s=100" width="100px;" alt="Rémi Delaporte-Mathurin"/><br /><sub><b>Rémi Delaporte-Mathurin</b></sub></a><br /><a href="#bug-RemDelaporteMathurin" title="Bug reports">🐛</a> <a href="#doc-RemDelaporteMathurin" title="Documentation">📖</a></td>
|
|
78
78
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/pmeier"><img src="https://avatars.githubusercontent.com/u/6849766?v=4?s=100" width="100px;" alt="Philip Meier"/><br /><sub><b>Philip Meier</b></sub></a><br /><a href="#bug-pmeier" title="Bug reports">🐛</a></td>
|
|
79
79
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/penelopeysm"><img src="https://avatars.githubusercontent.com/u/122629585?v=4?s=100" width="100px;" alt="Penelope Yong"/><br /><sub><b>Penelope Yong</b></sub></a><br /><a href="#ideas-penelopeysm" title="Ideas, Planning, & Feedback">🤔</a> <a href="#review-penelopeysm" title="Reviewed Pull Requests">👀</a> <a href="#code-penelopeysm" title="Code">💻</a> <a href="#doc-penelopeysm" title="Documentation">📖</a></td>
|
|
80
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ykd007"><img src="https://avatars.githubusercontent.com/u/79036688?v=4?s=100" width="100px;" alt="Yash Dhawan"/><br /><sub><b>Yash Dhawan</b></sub></a><br /><a href="#doc-ykd007" title="Documentation">📖</a></td>
|
|
80
81
|
</tr>
|
|
81
82
|
</tbody>
|
|
82
83
|
</table>
|
|
@@ -84,18 +84,18 @@ class AutoEmulate(ConversionMixin, TorchDeviceMixin, Results):
|
|
|
84
84
|
----------
|
|
85
85
|
x: InputLike
|
|
86
86
|
Input features.
|
|
87
|
-
y: InputLike
|
|
88
|
-
Target values
|
|
87
|
+
y: InputLike
|
|
88
|
+
Target values.
|
|
89
89
|
test_data: tuple[InputLike, InputLike] | None
|
|
90
90
|
Optional test data as a tuple (x_test, y_test). If None, a random split
|
|
91
91
|
from the provided data is used. Defaults to None.
|
|
92
|
-
models: list[type[Emulator]] | None
|
|
93
|
-
List of emulator classes to compare. If None,
|
|
94
|
-
are used.
|
|
95
|
-
x_transforms_list: list[list[Transform]] | None
|
|
92
|
+
models: list[type[Emulator] | str] | None
|
|
93
|
+
List of emulator classes or registered emulator names to compare. If None,
|
|
94
|
+
all available emulators are used.
|
|
95
|
+
x_transforms_list: list[list[Transform | dict]] | None
|
|
96
96
|
An optional list of sequences of transforms to apply to the input data.
|
|
97
97
|
Defaults to None, in which case the data is standardized.
|
|
98
|
-
y_transforms_list: list[list[Transform]] | None
|
|
98
|
+
y_transforms_list: list[list[Transform | dict]] | None
|
|
99
99
|
An optional list of sequences of transforms to apply to the output data.
|
|
100
100
|
Defaults to None, in which case the data is standardized.
|
|
101
101
|
model_params: ModelParams | None
|
|
@@ -125,13 +125,13 @@ class AutoEmulate(ConversionMixin, TorchDeviceMixin, Results):
|
|
|
125
125
|
Random seed for reproducibility. If None, no seed is set. Defaults to None.
|
|
126
126
|
log_level: str | None
|
|
127
127
|
Deprecated. Configure logging in the calling application instead.
|
|
128
|
-
tuning_metric: str |
|
|
128
|
+
tuning_metric: str | Metric
|
|
129
129
|
Metric to use for hyperparameter tuning. Can be a string shortcut
|
|
130
|
-
("r2", "rmse", "mse", "mae") or a
|
|
131
|
-
evaluation_metrics: list[str |
|
|
130
|
+
("r2", "rmse", "mse", "mae") or a Metric object. Defaults to "r2".
|
|
131
|
+
evaluation_metrics: list[str | Metric] | None
|
|
132
132
|
Metrics to compute during evaluation.
|
|
133
133
|
If None, then defaults to ["r2", "rmse"].
|
|
134
|
-
Each entry can be a string shortcut or a
|
|
134
|
+
Each entry can be a string shortcut or a Metric object.
|
|
135
135
|
IMPORTANT: The first metric in the list is used to
|
|
136
136
|
determine the best model.
|
|
137
137
|
show_progress_bar: bool
|
|
@@ -245,7 +245,7 @@ class AutoEmulate(ConversionMixin, TorchDeviceMixin, Results):
|
|
|
245
245
|
|
|
246
246
|
Parameters
|
|
247
247
|
----------
|
|
248
|
-
|
|
248
|
+
default_only: bool
|
|
249
249
|
Whether to display only default or all available emulators. Defaults to
|
|
250
250
|
True (default emulators only).
|
|
251
251
|
|
|
@@ -298,9 +298,7 @@ class AutoEmulate(ConversionMixin, TorchDeviceMixin, Results):
|
|
|
298
298
|
----------
|
|
299
299
|
models: list[type[Emulator] | str] | None
|
|
300
300
|
List of model classes or names to use for comparison. If None, all available
|
|
301
|
-
emulators are used
|
|
302
|
-
only_pytorch: bool
|
|
303
|
-
If True, only PyTorch emulators are returned. Defaults to False.
|
|
301
|
+
emulators are used, or probabilistic defaults when only_probabilistic=True.
|
|
304
302
|
only_probabilistic: bool
|
|
305
303
|
If True, only probabilistic emulators are returned. Defaults to False.
|
|
306
304
|
"""
|
|
@@ -73,18 +73,23 @@ def cross_validate(
|
|
|
73
73
|
specified cross-validation strategy (e.g., KFold, LeaveOneOut).
|
|
74
74
|
dataset: Dataset
|
|
75
75
|
The data to use for model training and validation.
|
|
76
|
-
model: Emulator
|
|
77
|
-
An
|
|
76
|
+
model: type[Emulator]
|
|
77
|
+
An Emulator subclass to fit during validation.
|
|
78
78
|
model_params: ModelParams
|
|
79
79
|
Model parameters to be used to construct model upon initialization. Passing an
|
|
80
80
|
empty dictionary `{}` will use default parameters.
|
|
81
81
|
transformed_emulator_params: None | TransformedEmulatorParams
|
|
82
82
|
Parameters for the transformed emulator. Defaults to None.
|
|
83
|
+
x_transforms: list[Transform] | None
|
|
84
|
+
Transforms to apply to input data before fitting the emulator. Defaults to None.
|
|
85
|
+
y_transforms: list[Transform] | None
|
|
86
|
+
Transforms to apply to output data before fitting the emulator.
|
|
87
|
+
Defaults to None.
|
|
83
88
|
device: DeviceLike
|
|
84
89
|
The device to use for model training and evaluation.
|
|
85
90
|
random_seed: int | None
|
|
86
91
|
Optional random seed for reproducibility.
|
|
87
|
-
metrics: list[
|
|
92
|
+
metrics: list[Metric] | None
|
|
88
93
|
List of metrics to compute. If None, uses r2 and rmse.
|
|
89
94
|
deterministic: bool
|
|
90
95
|
Whether to use deterministic algorithms in PyTorch. Defaults to False.
|
|
@@ -173,14 +178,11 @@ def bootstrap(
|
|
|
173
178
|
Target values corresponding to the input features.
|
|
174
179
|
n_bootstraps: int | None
|
|
175
180
|
Number of bootstrap samples to generate. When None the evaluation uses all
|
|
176
|
-
|
|
181
|
+
given data and returns a single value with no measure of the uncertainty.
|
|
177
182
|
Defaults to 100.
|
|
178
|
-
n_samples: int
|
|
179
|
-
Number of samples to generate to predict mean when emulator does not have a
|
|
180
|
-
mean directly available. Defaults to 1000.
|
|
181
183
|
device: str | torch.device
|
|
182
184
|
The device to use for computations. Default is "cpu".
|
|
183
|
-
metrics: list[
|
|
185
|
+
metrics: list[Metric] | None
|
|
184
186
|
List of metrics to compute. If None, uses r2 and rmse.
|
|
185
187
|
metric_params: MetricParams | None
|
|
186
188
|
Additional parameters to pass to the metrics. Defaults to None.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from typing import Literal
|
|
2
2
|
|
|
3
|
+
import matplotlib as mpl
|
|
3
4
|
import matplotlib.pyplot as plt
|
|
4
5
|
import numpy as np
|
|
5
6
|
import torch
|
|
@@ -10,6 +11,8 @@ from matplotlib.figure import Figure
|
|
|
10
11
|
from autoemulate.core.types import DistributionLike, GaussianLike, NumpyLike, TensorLike
|
|
11
12
|
from autoemulate.emulators.base import Emulator, PyTorchBackend
|
|
12
13
|
|
|
14
|
+
_NON_INTERACTIVE_BACKENDS = {"agg", "cairo", "pdf", "pgf", "ps", "svg", "template"}
|
|
15
|
+
|
|
13
16
|
|
|
14
17
|
def display_figure(fig: Figure):
|
|
15
18
|
"""
|
|
@@ -38,9 +41,18 @@ def display_figure(fig: Figure):
|
|
|
38
41
|
# we don't show otherwise it will double plot
|
|
39
42
|
plt.close(fig)
|
|
40
43
|
return fig
|
|
41
|
-
|
|
44
|
+
|
|
45
|
+
backend = mpl.get_backend().lower()
|
|
46
|
+
if any(
|
|
47
|
+
backend.endswith(non_interactive)
|
|
48
|
+
for non_interactive in _NON_INTERACTIVE_BACKENDS
|
|
49
|
+
):
|
|
50
|
+
plt.close(fig)
|
|
51
|
+
return fig
|
|
52
|
+
|
|
53
|
+
# in terminal with an interactive backend, show the plot
|
|
54
|
+
fig.show()
|
|
42
55
|
plt.close(fig)
|
|
43
|
-
plt.show()
|
|
44
56
|
return fig
|
|
45
57
|
|
|
46
58
|
|
|
@@ -28,7 +28,7 @@ class Tuner(ConversionMixin, TorchDeviceMixin):
|
|
|
28
28
|
----------
|
|
29
29
|
x: InputLike
|
|
30
30
|
Input features.
|
|
31
|
-
y:
|
|
31
|
+
y: InputLike | None
|
|
32
32
|
Target values (not needed if x is a Dataset).
|
|
33
33
|
n_iter: int
|
|
34
34
|
Number of parameter settings to randomly sample and test.
|
|
@@ -37,6 +37,8 @@ class Tuner(ConversionMixin, TorchDeviceMixin):
|
|
|
37
37
|
device (usually CPU or GPU).
|
|
38
38
|
random_seed: int | None
|
|
39
39
|
Random seed for reproducibility. If None, no seed is set.
|
|
40
|
+
tuning_metric: str | Metric
|
|
41
|
+
Metric to use for hyperparameter tuning. Defaults to "r2".
|
|
40
42
|
deterministic: bool
|
|
41
43
|
Whether to use deterministic algorithms in PyTorch. Defaults to False.
|
|
42
44
|
"""
|
|
@@ -85,12 +87,10 @@ class Tuner(ConversionMixin, TorchDeviceMixin):
|
|
|
85
87
|
----------
|
|
86
88
|
model_class: type[Emulator]
|
|
87
89
|
A concrete Emulator subclass.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
An optional list of sequences of transforms to apply to the output data.
|
|
93
|
-
Defaults to None, in which case the data is standardized.
|
|
90
|
+
x_transforms: list[Transform] | None
|
|
91
|
+
Optional sequence of transforms to apply to the input data.
|
|
92
|
+
y_transforms: list[Transform] | None
|
|
93
|
+
Optional sequence of transforms to apply to the output data.
|
|
94
94
|
transformed_emulator_params: None | TransformedEmulatorParams
|
|
95
95
|
Parameters for the transformed emulator. Defaults to None.
|
|
96
96
|
n_splits: int
|
|
@@ -613,16 +613,3 @@ def _is_affine_empirical(transform: Transform, x: TensorLike) -> bool:
|
|
|
613
613
|
for _ in range(AFFINE_TRIALS):
|
|
614
614
|
errs.append(_measure_affine_err(transform, test_input)) # type: ignore as Tensor input will transform to Tensor output
|
|
615
615
|
return (sum(errs) / len(errs)) < AFFINE_TOL
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
# TODO (#536): complete implementation
|
|
619
|
-
# class AutoEmulateTransformModule(TransformModule):
|
|
620
|
-
# @abstractmethod
|
|
621
|
-
# def fit(self, x): ...
|
|
622
|
-
# def _inverse_gaussian(self, y: GaussianLike) -> GaussianLike:
|
|
623
|
-
# msg = "This method should be implemented in subclasses."
|
|
624
|
-
# raise NotImplementedError(msg)
|
|
625
|
-
|
|
626
|
-
# def _inverse_sample(self, y: GaussianLike, n_samples: int = 100) -> GaussianLike:
|
|
627
|
-
# msg = "This method should be implemented in subclasses."
|
|
628
|
-
# raise NotImplementedError(msg)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: autoemulate
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.2
|
|
4
4
|
Summary: A python package for semi-automated emulation
|
|
5
5
|
Author: AutoEmulate contributors (see our GitHub page)
|
|
6
6
|
License-Expression: MIT
|
|
@@ -20,7 +20,7 @@ Description-Content-Type: text/markdown
|
|
|
20
20
|
License-File: LICENSE
|
|
21
21
|
Requires-Dist: matplotlib>=3.7.2
|
|
22
22
|
Requires-Dist: seaborn>=0.12.2
|
|
23
|
-
Requires-Dist: scikit-learn
|
|
23
|
+
Requires-Dist: scikit-learn>=1.3.0
|
|
24
24
|
Requires-Dist: pandas>=2.1
|
|
25
25
|
Requires-Dist: torch>=2.1.0
|
|
26
26
|
Requires-Dist: scipy>=1.11.3
|
|
@@ -36,7 +36,7 @@ Requires-Dist: anytree>=2.12.1
|
|
|
36
36
|
Requires-Dist: torchmetrics>=1.7.1
|
|
37
37
|
Requires-Dist: pyro-ppl>=1.9.1
|
|
38
38
|
Requires-Dist: torchrbf>=0.0.1
|
|
39
|
-
Requires-Dist: arviz
|
|
39
|
+
Requires-Dist: arviz<1.0,>=0.21.0
|
|
40
40
|
Requires-Dist: getdist>=1.7.2
|
|
41
41
|
Requires-Dist: einops>=0.8.1
|
|
42
42
|
Requires-Dist: harmonic>=1.3.0
|
|
@@ -87,7 +87,7 @@ You can find the project documentation [here](https://alan-turing-institute.gith
|
|
|
87
87
|
|
|
88
88
|
- The AutoEmulate project is run out of the [Alan Turing Institute](https://www.turing.ac.uk/).
|
|
89
89
|
- Visit [autoemulate.com](https://www.autoemulate.com/) to learn more.
|
|
90
|
-
- Feel free to reach out to us at [
|
|
90
|
+
- Feel free to reach out to us at [aiphys@turing.ac.uk](mailto:aiphys@turing.ac.uk) for queries about AutoEmulate or ideas for collaboration.
|
|
91
91
|
- We have also published a paper in [The Journal of Open Source Software](https://joss.theoj.org/papers/10.21105/joss.07626).
|
|
92
92
|
|
|
93
93
|
Please cite this paper if you use the package in your work:
|
|
@@ -137,14 +137,15 @@ You can find the project documentation [here](https://alan-turing-institute.gith
|
|
|
137
137
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/vchhabra-turing"><img src="https://avatars.githubusercontent.com/u/140401853?v=4?s=100" width="100px;" alt="vchhabra-turing"/><br /><sub><b>vchhabra-turing</b></sub></a><br /><a href="#ideas-vchhabra-turing" title="Ideas, Planning, & Feedback">🤔</a></td>
|
|
138
138
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/era-23"><img src="https://avatars.githubusercontent.com/u/115151590?v=4?s=100" width="100px;" alt="Ethan Attwood"/><br /><sub><b>Ethan Attwood</b></sub></a><br /><a href="#bug-era-23" title="Bug reports">🐛</a></td>
|
|
139
139
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/TheCSGuy25"><img src="https://avatars.githubusercontent.com/u/87066683?v=4?s=100" width="100px;" alt="__aar0n__.py"/><br /><sub><b>__aar0n__.py</b></sub></a><br /><a href="#code-TheCSGuy25" title="Code">💻</a></td>
|
|
140
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SyedHaider2084"><img src="https://avatars.githubusercontent.com/u/227389830?v=4?s=100" width="100px;" alt="SyedHaider2084"/><br /><sub><b>SyedHaider2084</b></sub></a><br /><a href="#code-SyedHaider2084" title="Code">💻</a></td>
|
|
140
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SyedHaider2084"><img src="https://avatars.githubusercontent.com/u/227389830?v=4?s=100" width="100px;" alt="SyedHaider2084"/><br /><sub><b>SyedHaider2084</b></sub></a><br /><a href="#code-SyedHaider2084" title="Code">💻</a> <a href="#doc-SyedHaider2084" title="Documentation">📖</a></td>
|
|
141
141
|
</tr>
|
|
142
142
|
<tr>
|
|
143
143
|
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/lcm98/"><img src="https://avatars.githubusercontent.com/u/102757707?v=4?s=100" width="100px;" alt="Loh Chun Mun"/><br /><sub><b>Loh Chun Mun</b></sub></a><br /><a href="#doc-cmsamaaa" title="Documentation">📖</a> <a href="#code-cmsamaaa" title="Code">💻</a></td>
|
|
144
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/z7076"><img src="https://avatars.githubusercontent.com/u/69681924?v=4?s=100" width="100px;" alt="Jichen Zhang"/><br /><sub><b>Jichen Zhang</b></sub></a><br /><a href="#code-z7076" title="Code">💻</a></td>
|
|
145
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/RemDelaporteMathurin"><img src="https://avatars.githubusercontent.com/u/40028739?v=4?s=100" width="100px;" alt="Rémi Delaporte-Mathurin"/><br /><sub><b>Rémi Delaporte-Mathurin</b></sub></a><br /><a href="#bug-RemDelaporteMathurin" title="Bug reports">🐛</a></td>
|
|
144
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/z7076"><img src="https://avatars.githubusercontent.com/u/69681924?v=4?s=100" width="100px;" alt="Jichen Zhang"/><br /><sub><b>Jichen Zhang</b></sub></a><br /><a href="#code-z7076" title="Code">💻</a> <a href="#doc-z7076" title="Documentation">📖</a></td>
|
|
145
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/RemDelaporteMathurin"><img src="https://avatars.githubusercontent.com/u/40028739?v=4?s=100" width="100px;" alt="Rémi Delaporte-Mathurin"/><br /><sub><b>Rémi Delaporte-Mathurin</b></sub></a><br /><a href="#bug-RemDelaporteMathurin" title="Bug reports">🐛</a> <a href="#doc-RemDelaporteMathurin" title="Documentation">📖</a></td>
|
|
146
146
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/pmeier"><img src="https://avatars.githubusercontent.com/u/6849766?v=4?s=100" width="100px;" alt="Philip Meier"/><br /><sub><b>Philip Meier</b></sub></a><br /><a href="#bug-pmeier" title="Bug reports">🐛</a></td>
|
|
147
147
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/penelopeysm"><img src="https://avatars.githubusercontent.com/u/122629585?v=4?s=100" width="100px;" alt="Penelope Yong"/><br /><sub><b>Penelope Yong</b></sub></a><br /><a href="#ideas-penelopeysm" title="Ideas, Planning, & Feedback">🤔</a> <a href="#review-penelopeysm" title="Reviewed Pull Requests">👀</a> <a href="#code-penelopeysm" title="Code">💻</a> <a href="#doc-penelopeysm" title="Documentation">📖</a></td>
|
|
148
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ykd007"><img src="https://avatars.githubusercontent.com/u/79036688?v=4?s=100" width="100px;" alt="Yash Dhawan"/><br /><sub><b>Yash Dhawan</b></sub></a><br /><a href="#doc-ykd007" title="Documentation">📖</a></td>
|
|
148
149
|
</tr>
|
|
149
150
|
</tbody>
|
|
150
151
|
</table>
|
|
@@ -95,12 +95,8 @@ autoemulate/emulators/transformed/__init__.py
|
|
|
95
95
|
autoemulate/emulators/transformed/base.py
|
|
96
96
|
autoemulate/emulators/transformed/delta_method.py
|
|
97
97
|
autoemulate/experimental/data/gaussian.py
|
|
98
|
-
autoemulate/experimental/data/spatiotemporal_dataset.py
|
|
99
|
-
autoemulate/experimental/emulators/fno.py
|
|
100
|
-
autoemulate/experimental/emulators/spatiotemporal.py
|
|
101
98
|
autoemulate/experimental/emulators/nn/gaussian_mlp.py
|
|
102
99
|
autoemulate/experimental/emulators/nn/zoib.py
|
|
103
|
-
autoemulate/experimental/neural_processes/conditional_neural_process.py
|
|
104
100
|
autoemulate/feature_generation/polynomial_features.py
|
|
105
101
|
autoemulate/learners/__init__.py
|
|
106
102
|
autoemulate/learners/base.py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
matplotlib>=3.7.2
|
|
2
2
|
seaborn>=0.12.2
|
|
3
|
-
scikit-learn
|
|
3
|
+
scikit-learn>=1.3.0
|
|
4
4
|
pandas>=2.1
|
|
5
5
|
torch>=2.1.0
|
|
6
6
|
scipy>=1.11.3
|
|
@@ -16,7 +16,7 @@ anytree>=2.12.1
|
|
|
16
16
|
torchmetrics>=1.7.1
|
|
17
17
|
pyro-ppl>=1.9.1
|
|
18
18
|
torchrbf>=0.0.1
|
|
19
|
-
arviz
|
|
19
|
+
arviz<1.0,>=0.21.0
|
|
20
20
|
getdist>=1.7.2
|
|
21
21
|
einops>=0.8.1
|
|
22
22
|
harmonic>=1.3.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "autoemulate"
|
|
3
|
-
version = "2.1.
|
|
3
|
+
version = "2.1.2"
|
|
4
4
|
description = "A python package for semi-automated emulation"
|
|
5
5
|
license = "MIT"
|
|
6
6
|
authors = [{ name = "AutoEmulate contributors (see our GitHub page)" }]
|
|
@@ -18,7 +18,7 @@ classifiers = [
|
|
|
18
18
|
dependencies = [
|
|
19
19
|
"matplotlib>=3.7.2",
|
|
20
20
|
"seaborn>=0.12.2",
|
|
21
|
-
"scikit-learn>=1.3.0
|
|
21
|
+
"scikit-learn>=1.3.0",
|
|
22
22
|
"pandas>=2.1",
|
|
23
23
|
"torch>=2.1.0",
|
|
24
24
|
"scipy>=1.11.3",
|
|
@@ -34,7 +34,7 @@ dependencies = [
|
|
|
34
34
|
"torchmetrics>=1.7.1",
|
|
35
35
|
"pyro-ppl>=1.9.1",
|
|
36
36
|
"torchrbf>=0.0.1",
|
|
37
|
-
"arviz>=0.21.0",
|
|
37
|
+
"arviz>=0.21.0,<1.0",
|
|
38
38
|
"getdist>=1.7.2",
|
|
39
39
|
"einops>=0.8.1",
|
|
40
40
|
"harmonic>=1.3.0",
|
|
@@ -119,8 +119,16 @@ filterwarnings = [
|
|
|
119
119
|
# Raised by PyTorch (via gpytorch) - not actionable here.
|
|
120
120
|
# Remove if dependencies no longer calling `torch.jit.script`.
|
|
121
121
|
"ignore:`torch\\.jit\\.script` is deprecated\\..*:DeprecationWarning",
|
|
122
|
+
# Raised by Pyro on Python 3.10 when parsing a dependency docstring.
|
|
123
|
+
"ignore:invalid escape sequence.*:DeprecationWarning:pyro\\.ops\\.stats",
|
|
124
|
+
# Raised when harmonic imports TensorFlow Probability's JAX backend.
|
|
125
|
+
"ignore:jax\\.interpreters\\.xla\\.pytype_aval_mappings is deprecated\\..*:DeprecationWarning:tensorflow_probability\\.python\\.internal\\.backend\\.jax\\.ops",
|
|
122
126
|
# PyTorch MPS backend capability fallbacks are backend noise in tests.
|
|
123
127
|
"ignore:The operator .* is not currently supported on the MPS backend.*:UserWarning",
|
|
128
|
+
# LightGBM automatically adds feature names to training data, which causes warnings when
|
|
129
|
+
# making predictions with unnamed data
|
|
130
|
+
# https://github.com/lightgbm-org/LightGBM/issues/6798
|
|
131
|
+
"ignore:X does not have valid feature names, but LGBMRegressor was fitted with feature names:UserWarning",
|
|
124
132
|
]
|
|
125
133
|
|
|
126
134
|
[tool.pyright]
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import h5py
|
|
2
|
-
import torch
|
|
3
|
-
from autoemulate.core.types import TensorLike
|
|
4
|
-
from torch.utils.data import Dataset
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class AutoEmulateDataset(Dataset):
|
|
8
|
-
"""A class for spatio-temporal datasets."""
|
|
9
|
-
|
|
10
|
-
def __init__(
|
|
11
|
-
self,
|
|
12
|
-
data_path: str | None,
|
|
13
|
-
data: dict | None = None,
|
|
14
|
-
n_steps_input: int = 1,
|
|
15
|
-
n_steps_output: int = 1,
|
|
16
|
-
stride: int = 1,
|
|
17
|
-
# TODO: support for passing data from dict
|
|
18
|
-
input_channel_idxs: tuple[int, ...] | None = None,
|
|
19
|
-
output_channel_idxs: tuple[int, ...] | None = None,
|
|
20
|
-
dtype: torch.dtype = torch.float32,
|
|
21
|
-
):
|
|
22
|
-
"""
|
|
23
|
-
Initialize the dataset.
|
|
24
|
-
|
|
25
|
-
Parameters
|
|
26
|
-
----------
|
|
27
|
-
data_path: str
|
|
28
|
-
Path to the HDF5 file containing the dataset.
|
|
29
|
-
n_steps_input: int
|
|
30
|
-
Number of input time steps.
|
|
31
|
-
n_steps_output: int
|
|
32
|
-
Number of output time steps.
|
|
33
|
-
stride: int
|
|
34
|
-
Stride for sampling the data.
|
|
35
|
-
data: dict | None
|
|
36
|
-
Preloaded data. Defaults to None.
|
|
37
|
-
input_channel_idxs: tuple[int, ...] | None
|
|
38
|
-
Indices of input channels to use. Defaults to None.
|
|
39
|
-
output_channel_idxs: tuple[int, ...] | None
|
|
40
|
-
Indices of output channels to use. Defaults to None.
|
|
41
|
-
dtype: torch.dtype
|
|
42
|
-
Data type for tensors. Defaults to torch.float32.
|
|
43
|
-
"""
|
|
44
|
-
self.dtype = dtype
|
|
45
|
-
self.n_steps_input = n_steps_input
|
|
46
|
-
self.n_steps_output = n_steps_output
|
|
47
|
-
self.stride = stride
|
|
48
|
-
self.input_channel_idxs = input_channel_idxs
|
|
49
|
-
self.output_channel_idxs = output_channel_idxs
|
|
50
|
-
|
|
51
|
-
# Read or parse data
|
|
52
|
-
self.read_data(data_path) if data_path is not None else self.parse_data(data)
|
|
53
|
-
|
|
54
|
-
# Destructured here
|
|
55
|
-
(
|
|
56
|
-
self.n_trajectories,
|
|
57
|
-
self.n_timesteps,
|
|
58
|
-
self.width,
|
|
59
|
-
self.height,
|
|
60
|
-
self.n_channels,
|
|
61
|
-
) = self.data.shape
|
|
62
|
-
|
|
63
|
-
# Pre-compute all subtrajectories for efficient indexing
|
|
64
|
-
self.all_input_fields = []
|
|
65
|
-
self.all_output_fields = []
|
|
66
|
-
self.all_constant_scalars = []
|
|
67
|
-
|
|
68
|
-
for traj_idx in range(self.n_trajectories):
|
|
69
|
-
# Create subtrajectories for this trajectory
|
|
70
|
-
fields = (
|
|
71
|
-
self.data[traj_idx]
|
|
72
|
-
.unfold(0, self.n_steps_input + self.n_steps_output, self.stride)
|
|
73
|
-
.permute(0, -1, 1, 2, 3) # [num_subtrajectories, T_in + T_out, W, H, C]
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
# Split into input and output
|
|
77
|
-
input_fields = fields[
|
|
78
|
-
:, : self.n_steps_input, ...
|
|
79
|
-
] # [num_subtrajectories, T_in, W, H, C]
|
|
80
|
-
output_fields = fields[
|
|
81
|
-
:, self.n_steps_input :, ...
|
|
82
|
-
] # [num_subtrajectories, T_out, W, H, C]
|
|
83
|
-
|
|
84
|
-
# Store each subtrajectory separately
|
|
85
|
-
for sub_idx in range(input_fields.shape[0]):
|
|
86
|
-
self.all_input_fields.append(
|
|
87
|
-
input_fields[sub_idx].to(self.dtype)
|
|
88
|
-
) # [T_in, W, H, C]
|
|
89
|
-
self.all_output_fields.append(
|
|
90
|
-
output_fields[sub_idx].to(self.dtype)
|
|
91
|
-
) # [T_out, W, H, C]
|
|
92
|
-
|
|
93
|
-
# Handle constant scalars
|
|
94
|
-
if self.constant_scalars is not None:
|
|
95
|
-
self.all_constant_scalars.append(
|
|
96
|
-
self.constant_scalars[traj_idx].to(self.dtype)
|
|
97
|
-
)
|
|
98
|
-
else:
|
|
99
|
-
self.all_constant_scalars.append(torch.tensor([]))
|
|
100
|
-
|
|
101
|
-
print(f"Created {len(self.all_input_fields)} subtrajectory samples")
|
|
102
|
-
print(f"Each input sample shape: {self.all_input_fields[0].shape}")
|
|
103
|
-
print(f"Each output sample shape: {self.all_output_fields[0].shape}")
|
|
104
|
-
print(f"Data type: {self.all_input_fields[0].dtype}")
|
|
105
|
-
|
|
106
|
-
def read_data(self, data_path: str):
|
|
107
|
-
"""Read data.
|
|
108
|
-
|
|
109
|
-
By default assumes HDF5 format in `data_path` with correct shape and fields.
|
|
110
|
-
"""
|
|
111
|
-
# TODO: support passing as dict
|
|
112
|
-
# Load data
|
|
113
|
-
self.data_path = data_path
|
|
114
|
-
with h5py.File(self.data_path, "r") as f:
|
|
115
|
-
assert "data" in f, "HDF5 file must contain 'data' dataset"
|
|
116
|
-
self.data: TensorLike = torch.Tensor(f["data"][:]).to(self.dtype) # type: ignore # [N, T, W, H, C] # noqa: PGH003
|
|
117
|
-
print(f"Loaded data shape: {self.data.shape}")
|
|
118
|
-
# TODO: add the constant scalars
|
|
119
|
-
self.constant_scalars = (
|
|
120
|
-
torch.Tensor(f["constant_scalars"][:]).to(self.dtype) # type: ignore # noqa: PGH003
|
|
121
|
-
if "constant_scalars" in f
|
|
122
|
-
else None
|
|
123
|
-
) # [N, C]
|
|
124
|
-
# TODO: add the constant fields
|
|
125
|
-
# self.constant_fields = torch.Tensor(f['data'][:]) # [N, W, H, C]
|
|
126
|
-
|
|
127
|
-
def parse_data(self, data: dict | None):
|
|
128
|
-
"""Parse data from a dictionary."""
|
|
129
|
-
if data is not None:
|
|
130
|
-
self.data = (
|
|
131
|
-
data["data"].to(self.dtype)
|
|
132
|
-
if torch.is_tensor(data["data"])
|
|
133
|
-
else torch.tensor(data["data"], dtype=self.dtype)
|
|
134
|
-
)
|
|
135
|
-
self.constant_scalars = data.get("constant_scalars", None)
|
|
136
|
-
self.constant_fields = data.get("constant_fields", None)
|
|
137
|
-
return
|
|
138
|
-
msg = "No data provided to parse."
|
|
139
|
-
raise ValueError(msg)
|
|
140
|
-
|
|
141
|
-
def __len__(self): # noqa: D105
|
|
142
|
-
return len(self.all_input_fields)
|
|
143
|
-
|
|
144
|
-
def __getitem__(self, idx): # noqa: D105
|
|
145
|
-
return {
|
|
146
|
-
"input_fields": self.all_input_fields[idx],
|
|
147
|
-
"output_fields": self.all_output_fields[idx],
|
|
148
|
-
"constant_scalars": self.all_constant_scalars[idx],
|
|
149
|
-
# TODO: add this
|
|
150
|
-
# "constant_fields": self.all_constant_fields[idx],
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
class MHDDataset(AutoEmulateDataset):
|
|
155
|
-
"""PyTorch Dataset for MHD data."""
|
|
156
|
-
|
|
157
|
-
def __init__(self, data_path: str, t_in: int = 5, t_out: int = 10, stride: int = 1):
|
|
158
|
-
super().__init__(
|
|
159
|
-
data_path, n_steps_input=t_in, n_steps_output=t_out, stride=stride
|
|
160
|
-
)
|