RuleMetrics class

The confusion-matrix tallies and derived rates for one rule over the corpus.

Annotations
  • @experimental

Constructors

RuleMetrics(String ruleId)
Creates a zeroed accumulator for ruleId.
RuleMetrics.fromJson(Map<String, dynamic> json)
Parses RuleMetrics from json (the derived rates are recomputed).
factory

Properties

cleanCases ↔ int
How many clean cases isolated this rule (the fpRateOnClean denominator).
getter/setter pair
falseNegatives ↔ int
Real violations the rule missed.
getter/setter pair
falsePositives ↔ int
Findings the rule reported that were not real violations.
getter/setter pair
falsePositivesOnClean ↔ int
False positives that occurred specifically on clean cases (target: 0).
getter/setter pair
fpRateOnClean → double
The rate of false positives across the clean cases isolating this rule.
no setter
hashCode → int
The hash code for this object.
no setterinherited
precision → double
Of the findings reported, the fraction that were real. Undefined when the rule reported nothing; reported as 1.0 (a rule that says nothing is never wrong).
no setter
recall → double
Of the real violations, the fraction the rule caught. Undefined when there were none; reported as 1.0.
no setter
ruleId → String
The rule these metrics describe.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
truePositives ↔ int
Real violations the rule caught.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
The JSON representation of these metrics (tallies plus derived rates).
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited