Skip to content

Refactor: add transforms and transformed emulator #474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 91 commits into from
Jun 27, 2025
Merged
Show file tree
Hide file tree
Changes from 88 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
9698fbf
Add transformed emulator and transform class, add PCA transform
sgreenbury May 8, 2025
944bd32
Add kwargs
sgreenbury May 16, 2025
77c1b32
Add example notebook
sgreenbury May 16, 2025
81321e3
Add _inverse_sample method
sgreenbury May 16, 2025
844ff56
Add refit placeholder
sgreenbury May 16, 2025
50394e0
Add initial test for transformed emulator
sgreenbury May 21, 2025
cdc404b
Add check for whether fitted
sgreenbury May 22, 2025
a6d2de2
Initial reimpl of VAE for refactor
sgreenbury May 22, 2025
7a9d501
Assert transform ops on TensorLike
sgreenbury May 22, 2025
372190b
Update poetry.lock
sgreenbury May 22, 2025
4f08241
Add utils and apply make_positive_definite
sgreenbury May 22, 2025
725ce86
Fix missing VAE init
sgreenbury May 22, 2025
80107c0
Add delta method for VAE
sgreenbury May 22, 2025
fe8c0fe
Add tests for transforms
sgreenbury May 22, 2025
2555143
Make transforms optional
sgreenbury May 23, 2025
37f0906
Add spectral approach, generalize test
sgreenbury May 23, 2025
d5bb502
Fix _inverse_sample shapes
sgreenbury May 23, 2025
6c4b8b3
Add test for inverse for gaussians
sgreenbury May 23, 2025
31c4a4b
Add fallback to sample if delta method fails
sgreenbury May 23, 2025
29ac348
Begin standardize transform
sgreenbury May 23, 2025
66647ba
Merge remote-tracking branch 'origin/main' into 348-refactor-preproce…
sgreenbury Jun 2, 2025
8325738
Fix import
sgreenbury Jun 2, 2025
e40da06
Initial standardize transform
sgreenbury Jun 3, 2025
8ec6c1b
Refactor common functionality to base class for transforms
sgreenbury Jun 4, 2025
0746610
Split basis_matrix and expanded_basis_matrix
sgreenbury Jun 4, 2025
333a5ba
Add kwargs to init for transformed emulator
sgreenbury Jun 4, 2025
f97748b
Update example notebook
sgreenbury Jun 4, 2025
904efc3
Add _cast, implement refit
sgreenbury Jun 4, 2025
f92be14
Add StandardizeTransform to init
sgreenbury Jun 4, 2025
754d208
Fix error msg, remove todo
sgreenbury Jun 4, 2025
f539acb
Fix case when elements of std are 0
sgreenbury Jun 4, 2025
5152b21
Extend tests
sgreenbury Jun 4, 2025
261faa7
Increase default number of retries
sgreenbury Jun 4, 2025
1c5644d
Update example notebook
sgreenbury Jun 4, 2025
f95abf5
Remove CNPModule from emulators
sgreenbury Jun 4, 2025
5843c68
Extend test to all emulators
sgreenbury Jun 4, 2025
06ccaa0
Add fixture with many targets
sgreenbury Jun 4, 2025
f9a925f
Ensure finite std
sgreenbury Jun 4, 2025
f34ca3a
Revise make_positive_definite fn
sgreenbury Jun 4, 2025
09d7151
Add tests for large number of targets
sgreenbury Jun 4, 2025
97b1aa8
Remove test with VAE transform without standardize
sgreenbury Jun 4, 2025
d930a5b
Fix pre-commit
sgreenbury Jun 4, 2025
4720548
Refactors
sgreenbury Jun 5, 2025
3c84ead
Update test cases for large number of targets
sgreenbury Jun 5, 2025
0a89d2e
Add niter to PCA
sgreenbury Jun 5, 2025
4962183
Add test for PCA
sgreenbury Jun 5, 2025
2964d18
Fix sample method
sgreenbury Jun 5, 2025
8ab2b95
Add initial tests comparing sample and basis transform
sgreenbury Jun 5, 2025
08c5cbd
Add prediction with sampled outputs for transformed emulator
sgreenbury Jun 5, 2025
986fd6a
Add required fields
sgreenbury Jun 5, 2025
fde4a10
Initial reaction diffusion with experimental
sgreenbury Jun 5, 2025
cd524f6
Fixing the sampling approaches, use linear ops for large cov matrix
sgreenbury Jun 6, 2025
e00d498
Only test cases with reduction for 100 targets
sgreenbury Jun 6, 2025
bff4e45
Add tests for 1000 targets, add todo
sgreenbury Jun 6, 2025
9ba545a
Update notebooks
sgreenbury Jun 6, 2025
585a624
Add device
sgreenbury Jun 6, 2025
dd770ed
Revise function defaults, add warnings and docstring
sgreenbury Jun 6, 2025
c9ba448
Remove retain_graph argument
sgreenbury Jun 6, 2025
b7a08bf
Add comments
sgreenbury Jun 17, 2025
3f87bee
Merge remote-tracking branch 'origin/main' into 348-refactor-preproce…
sgreenbury Jun 17, 2025
e99b7c8
Move transforms notebook to exploratory
sgreenbury Jun 18, 2025
fcccf07
Extend examples in notebook and explore error rate
sgreenbury Jun 18, 2025
7baedb9
Extend tests for transforms
sgreenbury Jun 18, 2025
3f763ac
Refine test for VAE inv transforms
sgreenbury Jun 18, 2025
bf1ef40
Merge branch 'main' into 348-refactor-preprocessing
sgreenbury Jun 18, 2025
3a5a617
Fix condition to retrain transforms
sgreenbury Jun 19, 2025
b723a8b
Refactor attribute aassignment
sgreenbury Jun 19, 2025
c7749a8
Revise docstrings
sgreenbury Jun 20, 2025
63025a5
Fix lints
sgreenbury Jun 20, 2025
bb5dc25
Refactor variable names and docstrings
sgreenbury Jun 20, 2025
1926abf
Update default device argument
sgreenbury Jun 20, 2025
ebf7dff
Revise TransformedEmulator API variable names and docstrings
sgreenbury Jun 20, 2025
f9bfc3a
Add docstring and refactor VAETrasnform
sgreenbury Jun 20, 2025
499fb4c
Move experimental reaction diffusion to experimental docs
sgreenbury Jun 24, 2025
1cc4d70
Update and extend _inverse_sample docstring
sgreenbury Jun 24, 2025
f886b7c
Update and extend docstrings
sgreenbury Jun 24, 2025
fc2f886
Add issue number for todo
sgreenbury Jun 24, 2025
ad52543
Add mixins to base transform
sgreenbury Jun 24, 2025
57d37f0
Add check_matrix call in StandardizeTransform
sgreenbury Jun 24, 2025
a75a24b
Remove niter in PCA test
sgreenbury Jun 24, 2025
d68894c
Update init and remove cache from API
sgreenbury Jun 24, 2025
98fd93e
Update fit with check, move comments, add type hints
sgreenbury Jun 24, 2025
2902587
Revise cache_size in API, add docstrings
sgreenbury Jun 24, 2025
3323ca9
Refactor with _convert_to_dataloader method
sgreenbury Jun 24, 2025
64e71b8
Add diagram for fitting
sgreenbury Jun 24, 2025
28dcbf1
Add and revise docstrings for clarity and completeness
sgreenbury Jun 24, 2025
062686d
Revise method for compatibility with base
sgreenbury Jun 24, 2025
9d299bb
Rename methods for clarity
sgreenbury Jun 24, 2025
e04ee4f
Merge branch 'main' into 348-refactor-preprocessing
sgreenbury Jun 25, 2025
31f16d0
Rename to random_seed, add todo
sgreenbury Jun 26, 2025
ef26951
Fix docstring
sgreenbury Jun 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ pyrightconfig.json
docs/data/shallow_water/X.npy
docs/data/shallow_water/Y.npy
docs/tutorials/05_reaction_diffusion copy.ipynb
docs/data/simulator_results.csv
docs/data/simulator_results.csv

# Ignore experimental exploratory data path
autoemulate/experimental/exploratory/data
5 changes: 3 additions & 2 deletions autoemulate/experimental/emulators/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
from .gaussian_process.exact import GaussianProcessExact
from .lightgbm import LightGBM
from .neural_processes.conditional_neural_process import CNPModule

# from .neural_processes.conditional_neural_process import CNPModule
from .random_forest import RandomForest
from .svm import SupportVectorMachine

ALL_EMULATORS = [
GaussianProcessExact,
LightGBM,
CNPModule,
# CNPModule,
SupportVectorMachine,
RandomForest,
]
1 change: 1 addition & 0 deletions autoemulate/experimental/emulators/random_forest.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def __init__( # noqa: PLR0913 allow too many arguments since all currently requ
max_samples: int | None = None,
random_seed: int | None = None,
device: DeviceLike = "cpu",
**kwargs,
):
"""Initializes a RandomForest object."""
_, _ = x, y # ignore unused arguments
Expand Down
Empty file.
Loading
Loading