action-rules: GPU-accelerated Python package for counterfactual explanations and recommendations - Sýkora, Lukáš; Kliegr, Tomáš (SoftwareX, 2025)
The action-rules package provides an efficient method for mining action rules using the Action-Apriori algorithm, a modification of the traditional Apriori algorithm tailored specifically for action rule mining. Designed to generate counterfactual explanations, this Python package enables researchers and practitioners to discover actionable insights by integrating user-defined parameters directly into the rule generation process, reducing computational overhead. The action-rules package supports optional GPU acceleration to further speed up processing on large datasets. The package provides a user-friendly API, as well as a command-line interface for versatile use. The package supports the customization of stable and flexible attributes, as well as separate minimum support and confidence thresholds for both the desired and undesired components of the rules. Comprehensive documentation, including a Jupyter Notebook example, is provided to facilitate ease of use for both novice and expert users.