Plot and Store Explanations

In this section, we present how you can plot and store your Explanations

All the Explanations generated with EXPAI will be wrapped in a class called expai.ExpaiExplanation. It will contain all the visualisations and details. In this section, we show how to plot each of the visualizations in an intuitive way.

expai.ExpaiExplanation

To initialise this class, it is required to get a Explanation object using a method from the classexpai.ExpaiModelFairness. More info here.

expai.ExpaiExplanation.get_keys

This method returns all visualisation keys generated. For instance, if you explain several variables, each of them will get one independent key.

expai.ExpaiExplanation.get_keys(self)

your_explanation.get_keys()

expai.ExpaiExplanation.plot

Plot a single visualisation from your Explanation using its key.

expai.ExpaiExplanation.plot(self, key: str = None)

# Plot only one variable
exp_var.plot(key="age")

expai.ExpaiExplanation.plot_all

Plot all the visualisations within an Explanation easily.

expai.ExpaiExplanation.plot_all(self)

your_explanation.plot_all()

Last updated