Statistics

Contains classes describing rules and rulesets statistics and metrics

class rulekit.stats.RuleSetStatistics(ruleset)

Statistics for ruleset.

SIGNIFICANCE_LEVEL

Significance level, default value is 0.05

Type:

float

time_total_sfloat

Time of constructing the rule set in seconds.

time_growing_sfloat

Time of growing in seconds.

time_pruning_sfloat

Time of pruning in seconds.

rules_countint

Number of rules in ruleset.

conditions_per_rulefloat

Average number of conditions per rule.

induced_conditions_per_rulefloat

Average number of induced conditions.

avg_rule_coveragefloat

Average rule coverage.

avg_rule_precisionfloat

Average rule precision.

avg_rule_qualityfloat

Average rule quality.

pvaluefloat

rule set significance.

FDR_pvaluefloat

Significance of the rule set with false discovery rate correction.

FWER_pvaluefloat

Significance of the rule set with familiy-wise error rate correction.

fraction_significantfloat

Fraction of rules significant at assumed level

fraction_FDR_significantfloat

Fraction of rules significant, set with false discovery rate correction, at assumed level.

fraction_FWER_significantfloat

Fraction of rules significant, set with familiy-wise error rate correction, at assumed level.

class rulekit.stats.RuleStatistics(rule)

Statistics for single rule.

p

Number of positives covered by the rule (accounting weights).

Type:

float

n

Number of negatives covered by the rule (accounting weights).

Type:

float

P

Number of positives in the training set (accounting weights).

Type:

float

N

Number of negatives in the training set (accounting weights).

Type:

float

weight

Rule weight.

Type:

float

pvalue

Rule significance.

Type:

float