ECMWFCode4Earth / ml_drought

Machine learning to better predict and understand drought. Moving github.com/ml-clim
https://ml-clim.github.io/drought-prediction/
89 stars 18 forks source link

Allow Morris gradients to be saved #138

Closed gabrieltseng closed 4 years ago

gabrieltseng commented 4 years ago

Tommy, opened a PR so you can use the code. The arrays are saved in the same way shap values are saved - this way, the utility functions we developed for shap values can also easily be used for Morris gradients.

A todo (~hopefully it can be included in this PR~ Done!) is to pass a TrainData object to the shap explainer too, and consolidate it into a single explain function, where the method (shap or morris) can be selected.

gabrieltseng commented 4 years ago

@tommylees112 let me know if this works for you! if it does, I'll clean up the API

gabrieltseng commented 4 years ago

Merging to use some of the refactors to data.py seperately. I'll open a new PR for the npy to netcdf stuff