Skip to content

Model with conditional interaction

In this example, we show regional effects of a model with conditional interactions using PDP, ALE, and RHALE. In particular, we:

  1. show how to use effector to estimate the regional effects using PDP, ALE, and RHALE
  2. provide the analytical formulas for the regional effects
  3. test that (1) and (2) match

We will use the following model:

f(x1,x2,x3)=x121x2<0+x121x20+ex3

where the features x1,x2,x3 are independent and uniformly distributed in the interval [1,1].

The model has an interaction between x1 and x2 caused by the terms: f1,2(x1,x2)=x121x2<0+x121x20. This means that the effect of x1 on the output y depends on the value of x2 and vice versa. Therefore, there is no golden standard on how to split the effect of f1,2 to two parts, one that corresponds to x1 and one to x2. Each global effect method has a different strategy to handle this issue. Below we will see how PDP, ALE, and RHALE handle this interaction.

In contrast, x3 does not interact with any other feature, so its effect can be easily computed as ex3.