Pseudocode (continued)
forall large itemsets lk, k>=2
GenRules(lk, am) /* Generate all valid rules a => (lk - a), for all a ? am */
A = {(m-1)-itemsets am-1 | am-1 ? am}
conf = support(lk) / support(am-1)
if (conf >= minconf) then
output the rule am-1 => (lk - am-1) with confidence=conf and support=support(lk)
GenRules(lk, am-1) /* Generate rules with subsets of am-1 as antecedents */