Rule
- class pyruleanalyzer.Rule(name, class_, conditions)
Represents a complete ruleset (path from root to leaf) in a decision tree.
This class is not designed to be operated directly, but by instead using the main RuleClassifier class.
- name
Name of the rule (e.g., “DT1_Rule36_Class0”)
- Type:
str
- class
Class that the rule assigns to matching instances (Note: trailing underscore is used because “class” is a Python keyword.)
- Type:
str
- conditions
List of condition strings (like “v2 > 0.5”)
- Type:
List[str]
- usage_count
Number of times the rule matched during classification
- Type:
int
- error_count
Number of times the rule matched but the prediction was wrong
- Type:
int