Theoretical background on the computation of counterfactual explanations