pyRuleAnalyzer: A python package for enhancing decision rules in tree-based machine learning models
Caio Dias Giló, Álvaro Sobrinho, Leandro Dias da Silva, Lucas Lopes, Erik Alexandre Bezerra, Lenardo Chaves e Silva, Danilo F. S. Santos, Ângelo Perkusich · SoftwareX · 2025
We present pyRuleAnalyzer, a Python package designed to support the refinement of decision rules in machine learning models based on decision trees, such as those implemented with Scikit-learn. The package enables automatic removal of redundant and overly specific rules, as well as manual correction of inaccurate ones. It incorporates evaluation metrics, considering accuracy, recall, precision, and sparsity to assess performance and interpretability before and after refinements. pyRuleAnalyzer supports binary and multiclass classification problems across various domains (e.g., cybersecurity). Once refined, users can deploy the improved model in real-world applications.