in diagnoser.py [0:0]
def _print_rule(self, rule, df: pd.DataFrame, target):
target_name, target_value = target
rule_stat = self._rule_stats(rule, df, target)
stats = ConfusionMatrix(df, target)
print(bold("Subgroup: {}".format(str(rule))))
overall_coverage = stats.num_covered(rule)
print("% of subgroup in population (Full Dataset):\t{}% ({} rows)".format(
percent_format(rule_stat['rule_coverage']),
overall_coverage)
)
print("Precision: P({}={} | {}) = {}%".format(
target_name,
target_value,
str(rule),
percent_format(rule_stat['precision'])
))
print("Recall: P({} | {}={}) = {}%".format(
str(rule),
target_name,
target_value,
percent_format(rule_stat['recall'])
))