credit.preblock.scaler#
Classes#
Scaling preblock using a fitted bridgescaler dict. |
Module Contents#
- class credit.preblock.scaler.BridgeScalerTransformer(scaler_path: str, variables: list[str], method: str)#
Bases:
credit.preblock.base.BasePreblockScaling preblock using a fitted bridgescaler dict.
Applies per-variable z-score scaling (or its inverse) to tensors in a nested batch dict of the form
batch[source][data_type][var_key].The scaler dict must have been fit with
bridgescaler.scale_var_dictusing the same nested structure and saved withbridgescaler.save_scaler_dict.Example config:
type: "bridgescaler_transform" args: scaler_path: "/path/to/scaler.json" variables: - "era5/prognostic/3d/T" - "era5/prognostic/3d/U" method: "transform"
- variables#
- method#
- scaler_path#
- scaler#
- forward(batch: dict) dict#