2. The RIPPER algorithm (by Cohen [1]) is an extension of an earlier algorithm
called IREP (by F¨urnkranz and Widmer [3]). Both algorithms apply the
reduced-error pruning method to determine whether a rule needs to be
pruned. The reduced error pruning method uses a validation set to estimate
the generalization error of a classifier. Consider the following pair of rules:
R1:A−→ C
R2:A∧B−→ C
R2is obtained by adding a new conjunct, B, to the left-hand side of R1.For
this question, you will be asked to determine whether R2is preferred over
R1from the perspectives of rule-growing and rule-pruning. To determine
whether a rule should be pruned, IREP computes the following measure:
vIREP =p+(N−n)
P+N,
where Pis the total number of positive examples in the validation set, Nis
the total number of negative examples in the validation set, pis the number
of positive examples in the validation set covered by the rule, and nis the
number of negative examples in the validation set covered by the rule. vIREP
is actually similar to classification accuracy for the validation set. IREP
favors rules that have higher values of vIREP . On the other hand, RIPPER
applies the following measure to determine whether a rule should be pruned:
vRIPPER =p−n
p+n.
(a) Suppose R1is covered by 350 positive examples and 150 negative ex-
amples, while R2is covered by 300 positive examples and 50 negative
examples. Compute the FOIL’s information gain for the rule R2with
respect to R1.
Answer:
For this problem, p0= 350, n0= 150, p1= 300, and n1= 50. There-
(b) Consider a validation set that contains 500 positive examples and 500
negative examples. For R1, suppose the number of positive examples
covered by the rule is 200, and the number of negative examples covered
by the rule is 50. For R2, suppose the number of positive examples
covered by the rule is 100 and the number of negative examples is 5.
Compute vIREP for both rules. Which rule does IREP prefer?