Loading…
DiCE (Diverse Counterfactual Explanations) is a Python package that generates multiple, diverse counterfactual explanations for any machine learning model, showing minimal feature changes needed to flip a prediction. It supports regression and multi-class classification and can work with pre-trained models or models trained without original training data, with optional constraints to ensure feasible counterfactuals. The method uses optimization to find perturbations that change outputs while balancing proximity and diversity, and it is installable via pip or conda with accompanying docs and example notebooks.
AI named DiCE from February 2026 to March 2026.