Skip to content

Conversation

@sgreenbury
Copy link
Collaborator

@sgreenbury sgreenbury commented Jul 24, 2025

Closes #645.

This PR:

  • Adds x_transform and y_transform as optional tranforms within the Emulator base class
  • Adds API to the __init__ of emulators to support setting this as standardize_x and standardize_y (StandardizeTransform())
  • Has the following defaults:
    • GPs: standardize_x=False (periodic functions are affected when True), standardize_y=True
    • MLPs: standardize_x=True, standardize_y=True
    • Other emulators: standardize_x=False, standardize_y=False

@sgreenbury sgreenbury marked this pull request as draft July 24, 2025 11:01
@sgreenbury sgreenbury force-pushed the 645-emulator-standardize branch 5 times, most recently from 0411ef3 to 386d964 Compare July 25, 2025 11:19
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov-commenter
Copy link

codecov-commenter commented Jul 25, 2025

Codecov Report

❌ Patch coverage is 95.45455% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.36%. Comparing base (7ac689c) to head (25257a5).

Files with missing lines Patch % Lines
autoemulate/experimental/emulators/base.py 85.71% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #650      +/-   ##
==========================================
+ Coverage   80.35%   80.36%   +0.01%     
==========================================
  Files         156      156              
  Lines       11202    11248      +46     
==========================================
+ Hits         9001     9040      +39     
- Misses       2201     2208       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 25, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  autoemulate/experimental/emulators
  base.py 87, 96, 102-107
  ensemble.py
  gradient_boosting.py
  lightgbm.py
  polynomials.py
  radial_basis_functions.py
  random_forest.py
  svm.py
  autoemulate/experimental/emulators/gaussian_process
  exact.py
  autoemulate/experimental/emulators/nn
  mlp.py
  autoemulate/experimental/learners
  base.py
  tests
  test_compare.py
  tests/experimental
  test_experimental_gaussian_process_exact.py
  test_experimental_transformed.py
Project Total  

This report was generated by python-coverage-comment-action

@sgreenbury sgreenbury marked this pull request as ready for review July 25, 2025 12:52
@sgreenbury sgreenbury force-pushed the 645-emulator-standardize branch from d0e8e02 to 23740f4 Compare July 25, 2025 15:44
@sgreenbury sgreenbury force-pushed the 645-emulator-standardize branch from 56681d8 to 25257a5 Compare July 29, 2025 13:51
@radka-j radka-j self-requested a review July 30, 2025 10:40
@radka-j
Copy link
Member

radka-j commented Jul 30, 2025

I like the default choices.

Comment on lines +24 to +25
standardize_x: bool = False,
standardize_y: bool = False,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth setting the default here to True (at least for the y) like with the MLP?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the other hand, I'm not sure it makes a big difference in this case and v0 doesn't standardise either.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From discussing, we think that having the defaults as False remains worthwhile so that users can opt-in to standardization and search over it in the model comparison loop still (e.g. x_transforms_list=[[], [StandardizeTransform()]])

Copy link
Member

@radka-j radka-j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@sgreenbury sgreenbury merged commit 933ecd4 into main Jul 30, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor: add support for standardize transform directly within Emulator

4 participants