-
Notifications
You must be signed in to change notification settings - Fork 23
Add standardization for x and y to Emulator
#650
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
Changes from all commits
655f569
bf8c8af
328c33e
1198959
1dcfd05
c62e3c6
8cdf477
112eae7
205fd01
8051416
121a670
38a40ba
25257a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
| from autoemulate.experimental.data.utils import set_random_seed | ||
| from autoemulate.experimental.device import TorchDeviceMixin | ||
| from autoemulate.experimental.emulators.base import PyTorchBackend | ||
| from autoemulate.experimental.transforms.standardize import StandardizeTransform | ||
| from autoemulate.experimental.types import DeviceLike, TensorLike | ||
|
|
||
|
|
||
|
|
@@ -20,6 +21,8 @@ def __init__( # noqa: PLR0913 | |
| self, | ||
| x: TensorLike, | ||
| y: TensorLike, | ||
| standardize_x: bool = False, | ||
| standardize_y: bool = False, | ||
|
Comment on lines
+24
to
+25
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From discussing, we think that having the defaults as |
||
| degree: int = 2, | ||
| lr: float = 0.1, | ||
| epochs: int = 500, | ||
|
|
@@ -32,6 +35,8 @@ def __init__( # noqa: PLR0913 | |
| TorchDeviceMixin.__init__(self, device=device) | ||
| if random_seed is not None: | ||
| set_random_seed(seed=random_seed) | ||
| self.x_transform = StandardizeTransform() if standardize_x else None | ||
| self.y_transform = StandardizeTransform() if standardize_y else None | ||
| self.degree = degree | ||
| self.lr = lr | ||
| self.epochs = epochs | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.