AssociationRule<T> class

Represents an association rule: antecedent => consequent.

An association rule suggests a relationship between two sets of items. For example, {bread, butter} => {milk} implies that customers who buy bread and butter are also likely to buy milk.

Constructors

AssociationRule({required Set<T> antecedent, required Set<T> consequent, required double support, required double confidence, required double lift, required double leverage, required double conviction})
Creates a new AssociationRule.

Properties

antecedent Set<T>
The antecedent (left-hand side) of the rule.
final
confidence double
The confidence of the rule.
final
consequent Set<T>
The consequent (right-hand side) of the rule.
final
conviction double
The conviction of the rule.
final
hashCode int
The hash code for this object.
no setteroverride
itemset Set<T>
Returns the full itemset (antecedent and consequent combined).
no setter
leverage double
The leverage of the rule.
final
lift double
The lift of the rule.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
support double
The support of the full itemset (antecedent ∪ consequent).
final

Methods

formatWithMetrics() String
Formats the rule with its key metrics for easy interpretation.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

compareByConfidence<T>(AssociationRule<T> a, AssociationRule<T> b) int
Compares rules by confidence (descending order).
compareByLift<T>(AssociationRule<T> a, AssociationRule<T> b) int
Compares rules by lift (descending order).
compareBySupport<T>(AssociationRule<T> a, AssociationRule<T> b) int
Compares rules by support (descending order).