Repo for machine learning models for regional prediction of hydrologic forcing functions. Includes probabilistic seasonal high flow regions for CONUS, and prediction of high flow metrics for selected regions.
This PR contains functions for SHAP, PDP and ICE plots. They can ideally be used for any of our prediction models, but they were tested to work with the multiclass prediction model.
Summary:
adds multiclass predictions for the mid-high (0.5-0.7) quantile classes
SHAP and PDP values for multiclass models are computed for each class and are computed for the average probability predicted from the 20 bootstrapped models.
Note that due to function expectations, there are several essentially duplicate functions like predict_shap_ranger_1, predict_shap_ranger_2 ... that are used to make predictions for each of 5 classes.
Removes physiographic region and GAGESII attributes from predictors
Example figures for High class 2 (rainfall-dominated)
This PR contains functions for SHAP, PDP and ICE plots. They can ideally be used for any of our prediction models, but they were tested to work with the multiclass prediction model.
Summary:
predict_shap_ranger_1
,predict_shap_ranger_2
... that are used to make predictions for each of 5 classes.Example figures for High class 2 (rainfall-dominated)![SHAP_global_RF_multiclass_high_NoPhysio_class2](https://user-images.githubusercontent.com/8761242/202760779-9e5294cf-aafa-4e20-b4dd-de8bc347fcf5.png)
SHAP dependence plot for CAT_PPT_JUN for class 2:![RF_multiclass_high_NoPhysio_class2_SHAP_dependence_CAT_PPT_JUN_weighted_avg](https://user-images.githubusercontent.com/8761242/204303173-c2ab10d6-0fd6-44be-9bad-1a4ac4549f87.png)
PDP:![PDP_offset_CAT_PPT_JUN_weighted_avg_RF_multiclass_high_NoPhysio](https://user-images.githubusercontent.com/8761242/204303334-346d8506-cc18-48bc-a775-707416764585.png)
Closes #154