RuleGenerator<T> constructor
Creates a new RuleGenerator.
minConfidence is the minimum confidence for rules.
frequentItemsets is the map of frequent itemsets to their support counts.
totalTransactions is the total number of original transactions.
Implementation
RuleGenerator({
required this.minConfidence,
required this.frequentItemsets,
required this.totalTransactions,
}) {
// Populate the support cache for efficient lookups.
for (final entry in frequentItemsets.entries) {
_supportCache[entry.key.toSet()] = entry.value;
}
}