ai2cm / fv3net

explore the FV3 data for parameterization
MIT License
16 stars 3 forks source link

Sktransform #2233

Closed AnnaKwa closed 1 year ago

AnnaKwa commented 1 year ago

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:

Coverage reports (updated automatically):