ECMWFCode4Earth / ml_drought

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

Update all the shap code (and other analysis) #104

Closed gabrieltseng closed 5 years ago

gabrieltseng commented 5 years ago

Feature importance analysis stalled out because of issues in the shap library.

These have now been fixed. This PR updates the code so that it works once again.

gabrieltseng commented 5 years ago

Sorry for the big PR @tommylees112 ; effectively, what this PR does is make the explain functions a little easier to call.

The input arrays are massaged to actually work with shap, and some analysis code which (up to now) lived in notebooks has been added so that other notebooks can call them too.