1
Return

counterfactuals: An R Package for Counterfactual Explanation Methods

delete2025-12-01
delete0
PRE
AI
S
Susanne Dandl
A
Andreas Hofheinz
M
Martin Binder
B
Bischl, Bernd
C
Casalicchio, Giuseppe *
DOI:10.18637/jss.v115.i09delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Counterfactual explanation methods provide information on how feature values of individual observations must be changed to obtain a desired prediction. Despite the increasing amount of proposed methods in research, only a few implementations exist, whose interfaces and requirements vary widely. In this work, we introduce the counterfactuals package, which provides a modular and unified R6-based interface for counterfactual explanation methods. We implemented three existing counterfactual explanation methods and propose some optional methodological extensions to generalize these methods to different scenarios and to make them more comparable. We explain the structure and workflow of the package using real use cases and show how to integrate additional counterfactual explanation methods into the package. In addition, we compared the implemented methods for a variety of models and datasets with regard to the quality of their counterfactual explanations and their runtime behavior.
Keywords:
counterfactual explanations
interpretable machine learning
R

Journal

Journal of Statistical Software cover
Journal of Statistical Software
IF:
8.1
Papers:
616
Citations:
4.6W

Organization

U
university of munich
Scholars:
1.4K
Papers: 500
Citations: 0
Cited Papers

Cited Papers

Citing Papers

Citing Papers