Chapter 2 Architecture of DALEX

DALEX’s architecture is simple and consistent. Actually, there are only three rules that should be remembered while using this tool.

  • First - use the explain() function to enrich a black-box model with additional metadata required by explainers. Various explainers require various metadata. You may find their list in Section 2.1.
  • Second - use the explainer function that calculates required descriptions. Consecutive explainers are introduced in Chapters 3 and 4.
  • Third - use generic print() or plot() function to see the explainer. Both functions work for one or more models.

These three steps are presented in Figure 2.1.

Figure 2.1. The overview of DALEX’s architecture.

A) Any predictive model with defined input \(x\) and output \(y_{raw} \in \mathcal R\) may be used.

B) Models are first enriched with additional metadata, such as a function that calculates predictions, validation data, model label or other components. The explain() function creates an object belonging to the explainer class that is used in further processing.

C) Specialized explainers calculate numerical summaries that can be plotted with generic plot() function.