USGS-R / regional-hydrologic-forcings-ml

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.
Creative Commons Zero v1.0 Universal
0 stars 4 forks source link

XAI for Multiclass Model #158

Closed jds485 closed 1 year ago

jds485 commented 1 year ago

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:

Example figures for High class 2 (rainfall-dominated) SHAP_global_RF_multiclass_high_NoPhysio_class2

SHAP dependence plot for CAT_PPT_JUN for class 2: RF_multiclass_high_NoPhysio_class2_SHAP_dependence_CAT_PPT_JUN_weighted_avg

PDP: PDP_offset_CAT_PPT_JUN_weighted_avg_RF_multiclass_high_NoPhysio

Closes #154