peal.visualization.model_comparison¶
Side-by-side comparison grids of several models on the same samples.
Samples are bucketed by a set of binary criteria (e.g. class, presence of a
confounder); one representative per bucket is picked from the dataset and
every model listed in columns is explained on it, either with LRP
heatmaps (LRPExplainer) or with counterfactuals
(CounterfactualExplainer). The result is rendered into a single image by
peal.visualization.image_grid.make_image_grid with checkbox columns that
show which criteria hold for each row.
Functions
Build the indicator tensor of one criterion over all criterion combos. |
|
Enumerate all combinations of binary criteria as checkbox columns. |
|
Pick one sample per criterion combination and explain it with each model. |
|
Explain every row of |