SelfExplainML / PiML-Toolbox

PiML (Python Interpretable Machine Learning) toolbox for model development & diagnostics
https://selfexplainml.github.io/PiML-Toolbox
Apache License 2.0
931 stars 111 forks source link

Support residual by level or bin of feature? #40

Open jphall663 opened 1 year ago

jphall663 commented 1 year ago

Would be a nice enhancement to support residual plots and analysis by feature and by level or bin of feature. This just allows for spotting of specific bugs, like in the image below.

mlha_0807

Prototype code here: https://nbviewer.org/github/jphall663/interpretable_machine_learning_with_python/blob/master/debugging_resid_analysis_redux.ipynb, cell 18.

For categorical features, residuals can be plotted across top-k levels, for numeric features they will have to binned before plotting.

ZebinYang commented 1 year ago

Thank you for this valuable suggestion.

Currently, the residual plot is based on full samples. We will consider adding the option to visualize only a subset of samples to be customized by users.