This adds a SkTransformer class which applies scaling and transform / inverse transforms. Its .predict method is a round trip of encode/decode. In practice, this class will be used as an encoder/decoder in reservoir models.
It includes an option for limiting all outputs to be positive. This is a pretty blunt tool for preventing specific humidities from being decoded as negative values, which I observed as a common failure mode which crashed simulations where encode/decode round trips were applied to FV3GFS states every few hours.
I also moved a couple sklearn related test modules into a tests_sklearn dir to try organize the fv3fit tests.
This adds a
SkTransformer
class which applies scaling and transform / inverse transforms. Its.predict
method is a round trip of encode/decode. In practice, this class will be used as an encoder/decoder in reservoir models.It includes an option for limiting all outputs to be positive. This is a pretty blunt tool for preventing specific humidities from being decoded as negative values, which I observed as a common failure mode which crashed simulations where encode/decode round trips were applied to FV3GFS states every few hours.
I also moved a couple sklearn related test modules into a
tests_sklearn
dir to try organize the fv3fit tests.Added public API:
SkTransformer
[x] Tests added
Coverage reports (updated automatically):