AssociationRule<T> constructor

AssociationRule<T>({
  1. required Set<T> antecedent,
  2. required Set<T> consequent,
  3. required double support,
  4. required double confidence,
  5. required double lift,
  6. required double leverage,
  7. required double conviction,
})

Creates a new AssociationRule.

Implementation

AssociationRule({
  required this.antecedent,
  required this.consequent,
  required this.support,
  required this.confidence,
  required this.lift,
  required this.leverage,
  required this.conviction,
}) {
  assert(antecedent.isNotEmpty, 'Antecedent cannot be empty');
  assert(consequent.isNotEmpty, 'Consequent cannot be empty');
  assert(support >= 0.0 && support <= 1.0, 'Support must be between 0 and 1');
  assert(
    confidence >= 0.0 && confidence <= 1.0,
    'Confidence must be between 0 and 1',
  );
}