An Optimization Approach to Learning Falling Rule Lists
Chaofan Chen, Cynthia Rudin
INTRODUCTION
In many real-life scenarios, we want to learn a predictive model that allows us to easily identify the most significant conditions that are predictive of a certain outcome. For example, in health care, doctors often want to know the conditions that signify a high risk of stroke, so that patients with such conditions can be prioritized in receiving treatment. A falling rule list, whose form was first proposed by Wang and Rudin (2015), is a type of model that serves this purpose.
Table 1 shows a falling rule list we learned from the bank-full dataset, which was used by Moro et al. (2011) in their study of applying data mining techniques to direct marketing. As we can see, a falling rule list is a probabilistic decision list for binary classification, consisting of a series of if-then rules with antecedents in the if clauses and probabilities of the desired outcome (“1”) in the then clauses, where the probabilities of the desired outcome (“1”) are monotonically decreasing down the list (hence the name “falling” rule list). The falling rule list in Table 1 has identified clients for whom the previous marketing campaign was successful (“poutcome=success”), and who have no credit in default (“default=no”), as individuals who are most likely to subscribe to a term deposit in the current marketing campaign. Their probability of subscribing is . Of the remaining clients, those who are next most likely to sign up for a term deposit are older people (aged between 60 and 100) with no credit in default. Their probability of subscribing is . The two rightmost columns in Table 1, labeled and , show the number of positive training examples (i.e. clients who subscribe to a term deposit in the current campaign) and of negative training examples, respectively, that satisfy the antecedent in each rule of the falling rule list.
Falling rule lists can provide valuable insight into data – if we know how to construct them well. In this paper, we propose an optimization approach to learning falling rule lists and “softly” falling rule lists, along with Monte-Carlo search algorithms that use bounds on the optimal solution to prune the search space. The falling rule list shown in Table 1 was produced using Algorithm FRL, which we shall introduce later.
Our work lives within several well-established fields, but is the first work we know of to use an optimization approach to handling monotonicity constraints in rule-based models. It relates closely to associative classification (e.g. the RIPPER algorithm (Cohen,, 1995) and the CBA algorithm (Liu et al.,, 1998); see Thabtah, (2007) for a comprehensive review) and inductive logic programming (Muggleton and De Raedt,, 1994). The proposed algorithms are competitors for decision tree methods like CART (Breiman et al.,, 1984), ID3 (Quinlan,, 1986), C4.5 (Quinlan,, 1993), and C5.0 (Quinlan,, 2004), and decision list learning (Rivest,, 1987). Almost all methods from this class build decision trees from the top down using greedy splitting criteria. Greedy splitting criteria do not lend naturally to constrained models like falling rule lists. There are some works on decision trees with monotonicity constraints (e.g. Altendorf et al.,, 2005; Ben-David,, 1995; Feelders and Pardoel,, 2003), but they focus mostly on enforcing the monotonic relationship between certain attributes and ordinal class labels. In addition, our work also relates to those that underline the importance of the interpretability of models (Freitas,, 2014; Huysmans et al.,, 2011; Kodratoff,, 1994; Martens and Baesens,, 2010).
Wang and Rudin (2015) proposed the form of a falling rule list, and a Bayesian approach to learning falling rule lists (extending the ideas of Letham et al., (2015) and Yang et al., (2017)). The Bayesian approach offers some advantages: e.g. a full posterior over rule lists allows model averaging. However, the optimization perspective has an important computational advantage: the search space is made substantially smaller by the tight bounds presented here. The concept of softly falling rule lists is novel to this paper and has not been done in the Bayesian setting.
PROBLEM FORMULATION
We first formalize the notion of an antecedent, of a rule list, of a falling rule list, and of a prefix.
An antecedent on an input domain is a Boolean function that outputs true or false. Given an input , we say that satisfies the antecedent if evaluates to true. For example, (poutcome=success AND default=no) in Table 1 is an antecedent.
A rule list on an input domain is a probabilistic decision list of the following form: “if satisfies , then ; else if satisfies , then ; ; else if satisfies , then ; else ” where is the -th antecedent in , , and denotes the size of the rule list, which is defined as the number of rules, excluding the final else clause, in the rule list. We can denote the rule list as follows:
The rule list of Equation (1) is a falling rule list if the following inequalities hold:
For convenience, we sometimes refer to the final else clause in as the -th antecedent in , which is satisfied by all . We denote the space of all possible rule lists on by .
A prefix on an input domain is a rule list without the final else clause. We can denote the prefix as follows:
where is the -th antecedent in , , and denotes the size of the prefix, which is defined as the number of rules in the prefix.
Given the rule list of Equation (1) (or the prefix of Equation (3)), we say that an input is captured by the -th antecedent in (or ) if satisfies (or , respectively), and for all (or , respectively) such that satisfies (or , respectively), holds – in other words, (or , respectively) is the first antecedent that satisfies. We define the function capt by (or ) if is captured by the -th antecedent in (or ). Moreover, given the prefix of Equation (3), we say that an input is captured by the prefix if is captured by some antecedent in , and we define if is not captured by the prefix .
Let be the training data, with and for each . We now define the empirical positive proportion of an antecedent, and introduce the notion of a rule list (or a prefix) that is compatible with .
Given the training data and the rule list of Equation (1) (or the prefix of Equation (3)), we denote by , , (or , , ), the number of positive, negative, and all training inputs captured by the -th antecedent in (or ), respectively, and define the empirical positive proportion of the -th antecedent in (or ), denoted by (or ), as:
Given the training data and the rule list of Equation (1) (or the prefix of Equation (3)), we say that the rule list (or the prefix ) is compatible with if for all (or , respectively), the equation (, respectively) holds. We denote the space of all possible rule lists on that are compatible with the training data by .
Given the training data , the rule list of Equation (1), a threshold , and the weight for the positive class, the empirical risk of misclassification by the rule list on the training data with threshold and with weight for the positive class, denoted by , is:
If is compatible with , we can replace in Equation (4) with . We define the empirical risk of misclassification by the prefix on the training data with threshold and with weight for the positive class, denoted by , analogously:
If is compatible with , we can replace in Equation (5) with . Note that for any rule list that begins with a given prefix , is the contribution by the prefix to .
We can formulate the problem of learning falling rule lists as a minimization program of the empirical risk of misclassification, given by Equation (4), with a regularization term that penalizes each rule in with a cost of to limit the number of rules, subject to the monotonicity constraint (2). For now, we focus on the problem of learning falling rule lists that are compatible with the training data .
Let and be the regularized empirical risk of misclassification by the rule list and by the prefix , respectively, on the training data . The former defines the objective of the minimization program, and the latter gives the contribution by the prefix to for any rule list that begins with . The following theorem provides a motivation for setting the threshold to in the minimization program – the empirical risk of misclassification by a given rule list is minimized when is set in this way.
Given the training data , a rule list that is compatible with , and the weight for the positive class, we have for all .
For reasons of computational tractability and model interpretability, we further restrict our attention to learning compatible falling rule lists whose antecedents must come from a pre-determined set of antecedents . We now present the optimization program for learning falling rule lists, which forms the basis of the rest of this paper.
The constraint (6) is exactly the monotonicity constraint (2) for the falling rule lists that are compatible with . The constraint (7) limits the choice of antecedents. An instance of Program 2.9 is defined by the tuple .
ALGORITHM
In this section, we outline a Monte-Carlo search algorithm, Algorithm FRL, based on Program 2.9, for learning compatible falling rule lists from data. Given an instance of Program 2.9, the algorithm constructs a compatible falling rule list in each iteration, while keeping track of the falling rule list that has the smallest objective value among all the falling rule lists that the algorithm has constructed so far. At the end of iterations, the algorithm outputs the falling rule list that has the smallest objective value out of the lists it has constructed.
In the process of constructing a falling rule list , the algorithm chooses the antecedents successively, and uses various properties of Program 2.9, presented in Section 4, to prune the search space. In particular, when the algorithm is choosing the -th antecedent in , it considers only those antecedents satisfying the following conditions: (1) the inclusion of as the -th antecedent in gives rise to a rule that respects the monotonicity constraint and the necessary condition for optimality (Corollary 4.5), and (2) the inclusion of as the -th antecedent in gives rise to a prefix such that is feasible for Program 2.9 under the training data (Proposition 4.2), and the best possible objective value achievable by any falling rule list that begins with and is compatible with (Theorem 4.6) is less than the current best objective value . The algorithm terminates the construction of if Inequality (9) in Theorem 4.6 holds. The details of the algorithm can be found in the supplementary material.
PREFIX BOUND
The goal of this section is to find a lower bound on the objective value of any compatible falling rule list that begins with a given compatible prefix, which we call a prefix bound, and to prove the various results used in the algorithm. To derive this prefix bound, we first introduce the concept of a feasible prefix, with which it is possible to construct a compatible falling rule list from data.
Given the training data and the set of antecedents , a prefix is feasible for Program 2.9 under the training data and the set of antecedents if is compatible with , and there exists a falling rule list such that is compatible with , the antecedents of come from , and begins with .
The following proposition gives necessary and sufficient conditions for a prefix to be feasible.
We now introduce the concept of a hypothetical rule list, whose antecedents do not need to come from the pre-determined set of antecedents .
Given a pre-determined set of antecedents , a hypothetical rule list with respect to is a rule list that contains an antecedent that is not in .
We need the following lemma to prove the necessary condition for optimality (Corollary 4.5), and to derive a prefix bound (Theorem 4.6).
Suppose that we are given an instance of Program 2.9, a prefix that is feasible for Program 2.9 under and , and a (possibly hypothetical) falling rule list that begins with and is compatible with . Then there exists a falling rule list , possibly hypothetical with respect to , such that begins with , has at most one more rule (excluding the final else clause) following , is compatible with , and satisfies
A consequence of the above lemma is that an optimal solution for a given instance of Program 2.9 should not have any antecedent whose empirical positive proportion falls below .
If is an optimal solution for a given instance of Program 2.9, then we must have for all .
Another implication of Lemma 4.4 is that the objective value of any compatible falling rule list that begins with a given prefix cannot be less than a lower bound on the objective value of any compatible falling rule list that begins with the same prefix , and has at most one more rule (excluding the final else clause) following . This leads to the following theorem.
Suppose that we are given an instance of Program 2.9 and a prefix that is feasible for Program 2.9 under and . Then any falling rule list that begins with and is compatible with satisfies
is a lower bound on the objective value of any compatible falling rule list that begins with , under the instance of Program 2.9. We call the prefix bound for . Further, if
The results presented in this section are used in Algorithm FRL to prune the search space. The proofs can be found in the supplementary material.
SOFTLY FALLING RULE LISTS
An instance of Program 5.1 is defined by the tuple . Similarly, we have a Monte-Carlo search algorithm, Algorithm softFRL, based on Program 5.1, for learning softly falling rule lists from data. Given an instance of Program 5.1, this algorithm searches through the space of rule lists that are compatible with and finds a compatible rule list whose antecedents come from , and whose objective value is the smallest among all the rule lists that the algorithm explores. It then turns this compatible rule list into a softly falling rule list. In the search phase, the algorithm uses the following prefix bound (Theorem 5.2) to prune the search space of compatible rule lists. The details of Algorithm softFRL and the proof of Theorem 5.2 can be found in the supplementary material.
Suppose that we are given an instance of Program 5.1 and a prefix that is compatible with . Then any rule list that begins with and is compatible with satisfies
is a lower bound on the objective value of any compatible rule list that begins with , under the instance of Program 5.1. In Equation (10), , , and are defined by
EXPERIMENTS
In this section, we demonstrate our algorithms for learning falling rule lists using a real-world application – learning the conditions that are predictive of the success of a bank marketing effort, from previous bank marketing campaign data. We used the public bank-full dataset (Moro et al.,, 2011), which contains observations, with predictor variables that were discretized. We used the frequent pattern growth (FP-growth) algorithm (Han and Pei,, 2000) to generate the set of antecedents from the dataset. For reasons of model interpretability and generalizability, we included in the antecedents that have at most predicates, and have at least support within the data that are labeled positive or within the data that are labeled negative. Besides the FP-growth algorithm, there is a vast literature on rule mining algorithms (e.g. Agrawal and Srikant,, 1994; Han et al.,, 2000; Landwehr et al.,, 2005), and any of these can be used to produce antecedents for our algorithms.
The bank-full dataset is imbalanced – there are only positive instances out of observations. A trivial model that always predicts the negative outcome for a bank marketing campaign will achieve close to accuracy on this dataset, but it will not be useful for the bank to understand what makes a marketing campaign successful. Moreover, when predicting if a future campaign will be successful in finding a client, the bank cares more about “getting the positive right” than about “getting the negative right” – a false negative means a substantial loss in revenue, while a false positive incurs little more than some phone calls.
We also plotted the number of antecedents considered by Algorithm FRL and Algorithm softFRL in the process of constructing a rule list at each iteration (Figures 1(b) and 1(c)), when we applied the two algorithms to the entire dataset. Each curve in either plot corresponds to a rule list constructed in an iteration of the appropriate algorithm. The intensity of the curve is inversely proportional to the iteration number – the larger the iteration number, the lighter the curve is. The number of antecedents considered by Algorithm FRL stays below in all but a few early iterations (despite a choice of antecedents available), and the number considered by either algorithm generally decreases drastically in each iteration after three or four antecedents have been chosen. The curves generally become lighter as we move vertically down the plots, indicating that as we find better rule lists, there are less antecedents to consider at each level. Algorithm softFRL needs to consider more antecedents in general since the search space is less constrained. All of these demonstrate that the prefix bounds we have derived for our algorithms are effective in excluding a large portion of the search space of rule lists. The supplementary material contains more rule lists created using our algorithms with different parameter values.
Since this paper was directly inspired by Wang and Rudin (2015), who proposed a Bayesian approach to learning falling rule lists, we conducted a set of experiments comparing their work to ours. We trained falling rule lists on the entire bank-full dataset using both the Bayesian approach and our optimization approach, and plotted the weighted training loss over real runtime for each positive class weight with the threshold set to (By Theorem 2.8, this is the threshold with the least weighted training loss for any given rule list). Since we want to focus our experiments on the efficiency of searching the model space, the runtimes recorded do not include the time for mining the antecedents. Note that the Bayesian approach is not cost-sensitive, and does not optimize the weighted training loss directly. However, in many real-life applications such as predicting the success of a future marketing campaign, it is desirable to minimize the expected weighted loss. Therefore, it is reasonable to compare the two approaches using the weighted training loss to demonstrate the advantages of our optimization approach. We compared the Bayesian approach only with Algorithm FRL, because both methods strictly enforce the monotonicity constraint on the positive proportions of the training data that are classified into each rule. Softly falling rule lists do not strictly enforce the monotonicity constraint, and are therefore not used for comparison. Figure 2 shows the plots of the weighted training loss over real runtime. Due to the random nature of both approaches, the experiments were repeated several times – more plots of the weighted training loss over real runtime for different trials of the same experiment, along with falling rule lists created using both approaches, can be found in the supplementary material. As shown in Figure 2, our optimization approach tends to find a falling rule list with a smaller weighted training loss faster than the Bayesian approach. This is not too surprising because in our approach, the search space is made substantially smaller by the tight bounds presented here, whereas in the original Bayesian approach, there are no tight bounds on optimal solutions to restrict the search space – even if we constructed bounds for the original Bayesian approach, they would involve loose approximations to gamma functions.
CONCLUSION
We have proposed an optimization approach to learning falling rule lists and softly falling rule lists, along with Monte-Carlo search algorithms that use bounds on the optimal solution to prune the search space. A recent work by Angelino et al., (2017) on (non-falling) rule lists showed that it is possible to exhaustively optimize an objective over rule lists, indicating that the space of lists is not as large as one might think. Our search space is a dramatically constrained version of their search space, allowing us to reasonably believe that it can be searched exhaustively. Unfortunately, almost none of the logic of Angelino et al., (2017) can be used here. Indeed, introducing the falling constraint or the monotonicity penalty changes the nature of the problem, and the bounds in our work are entirely different. The algorithm of Angelino et al., (2017) is not cost-sensitive, which led in this work to another level of complexity for the bounds.
Falling rule lists are optimized for ease-of-use – users only need to check a small number of conditions to determine whether an observation is in a high risk or high probability subgroup. As pointed out by Wang and Rudin, (2015), the monotonicity in probabilities in falling rule lists allows doctors to identify the most at-risk patients easily. Typical decision tree methods (CART, C4.5, C5.0) do not have the added interpretability that comes from the falling constraint in falling rule lists: one may have to check many conditions in a decision tree to determine whether an observation is in a high risk or high probability subgroup – even if the decision tree has a small depth, it is possible that high risk subgroups are in different parts of the tree, so that one still has to check many conditions in order to find high risk subgroups. In this sense, falling rule lists and softly falling rule lists are as sparse as we need them to be, and they can provide valuable insight into data.
Supplementary Material and Code: The supplementary material and code are available at https://github.com/cfchen-duke/FRLOptimization.
This work was sponsored in part by MIT Lincoln Laboratory.
References
References
Supplementary Material
Algorithm FRL
In this section, we present Algorithm FRL in detail. Given an instance of Program 2.9, the algorithm searches through the space of falling rule lists that are compatible with and outputs a compatible falling rule list that respects the constraints of Program 2.9, and whose objective value is the smallest among all the falling rule lists that the algorithm explores. It does so by iterating over steps, in each of which the algorithm constructs a compatible falling rule list , while keeping track of the falling rule list that has the smallest objective value among all the falling rule lists that the algorithm has constructed so far. At the end of iterations, the algorithm outputs the falling rule list that has the smallest objective value out of the lists it has constructed.
The algorithm uses various properties of Program 2.9, which are presented in Section 4, to prune the search space. More specifically, the algorithm terminates the construction of if Inequality (9) in Theorem 4.6 holds. Otherwise it either terminates the construction of with some probability, or proceeds to construct a candidate set of possible next antecedents, as follows. For every antecedent that has not been chosen before, it constructs a candidate next rule by setting and computing using Definition 2.5. The algorithm then checks if the monotonicity constraint and the necessary condition for optimality (Corollary 4.5) are satisfied, if the prefix is feasible under Program 2.9 (i.e. whether there exists a compatible falling rule list that begins with the prefix ) using Proposition 4.2, and if the best possible objective value achievable by any falling rule list that begins with and is compatible with (Theorem 4.6) is less than the current best objective value . If all of the above conditions are satisfied, the algorithm adds to . Once the construction of is complete, the algorithm randomly chooses an antecedent with probability and uses this antecedent, together with its empirical positive proportion, as the next rule for . If is empty, the algorithm terminates the construction of .
A possible choice of the curiosity function for use in Algorithm FRL is given by
The pseudocode of Algorithm FRL is shown in Algorithm 1.
Algorithm softFRL
A possible choice of the curiosity function for use in Algorithm softFRL is given by
The pseudocode of Algorithm softFRL is shown in Algorithm 2.
Proofs of Theorem 2.8, Proposition 4.2, Lemma 4.4, Corollary 4.5, and Theorem 4.6
Theorem 2.8. Given the training data , a rule list that is compatible with , and the weight for the positive class, we have
Suppose . Consider the -th rule in , whose antecedent captures positive training inputs and negative training inputs. Let denote the contribution by the -th rule to , i.e.
Case 1. . In this case, we have
Case 2. . In this case, both and are equal to .
Case 3. . In this case, both and are equal to .
The proof for given is similar. ∎
(1) (3): Suppose that Statement (1) holds. Then there exists a falling rule list
(3) (2): Suppose that Statement (3) holds. Then we have
Before we proceed with proving Lemma 4.4, we make the following observation.
that begins with a given prefix , we have
We can establish Equations (15) and (16) using essentially the same argument. ∎
Lemma 4.4. Suppose that we are given an instance of Program 2.9, a prefix that is feasible for Program 2.9 under the training data and the set of antecedents , and a (possibly hypothetical) falling rule list that begins with and is compatible with . Then there exists a falling rule list , possibly hypothetical with respect to , such that begins with , has at most one more rule (excluding the final else clause) following , is compatible with , and satisfies
Case 1. There exists some that satisfies but . For any , we have , and the contribution by the -th rule to , defined by Equation (13) with , is given by
For any , we have , and the contribution by the -th rule to is given by
The rest of the proof for this case proceeds in three steps.
Step 1. Construct a hypothetical falling rule list that begins with , has exactly one more rule (excluding the final else clause) following , and is compatible with . In later steps, we shall show that the falling rule list constructed in this step satisfies .
Let be the falling rule list of size that is compatible with , such that
is the antecedent given by the logical or’s of the antecedents through in .
Step 2. Show that the empirical risk of misclassification by the falling rule list is the same as that by the falling rule list .
To see this, we observe that the training instances captured by in are exactly those captured by the antecedents through in , and the training instances captured by (i.e. the final else clause) in are exactly those captured by the antecedents through in . This observation implies
Since is compatible with , using the definition of a compatible rule list in Definition 2.6 and the definition of the empirical positive proportion in Definition 2.5, together with (19), (21), (22), and (23), we must have
This means that the contribution by the -th rule to is given by
where we have used (20), and the contribution by the -st “rule” (i.e. the final else clause) to is given by
It then follows that the empirical risk of misclassification by the rule list is the same as that by the rule list :
Using (24), together with the observation , we must also have
Case 2. holds for all . Then the contribution by the -th rule to , for all , is given by Equation (17). Let be the falling rule list of size that is compatible with . Then the instances captured by (i.e. the final else clause) in are exactly those that are not captured by , or equivalently, those that are captured by through . This implies
Since is compatible with , using the definition of a compatible rule list in Definition 2.6 and the definition of the empirical positive proportion in Definition 2.5, together with (25) and (27), we must have
Inequality (29) implies that the contribution by the -th “rule” (i.e. the final else clause) to is given by
It then follows that the empirical risk of misclassification by the rule list is the same as that by the rule list :
Since we clearly have , we must also have
Case 3. holds for all . The proof is similar to Case 2, with for all given by Equation (18), the “greater than” in Inequality 29 replaced by “less than or equal to”, and given by
Corollary 4.5. If is an optimal solution for a given instance of Program 2.9, then we must have for all .
Suppose that were an optimal solution for a given instance of Program 2.9, such that form some . Let
Before we proceed with proving Theorem 4.6, we make two other observations.
Observation 10.2. For any rule list , we have
Since denotes the total number of training inputs captured by the -th antecedent in , which is exactly the sum of the number of positive training inputs captured by that antecedent (denoted ), and the number of negative training inputs captured by the same antecedent (denoted ), we have
The desired equation follows from rearranging the terms. ∎
that has exactly one rule (excluding the final else clause) following a given prefix , we have
Applying Observation 10.1 with , we have
Equations (31), (32), and (33) follow from rearranging the terms in the above equations. ∎
Theorem 4.6. Suppose that we are given an instance of Program 2.9 and a prefix that is feasible for Program 2.9 under the training data and the set of antecedents . Then any falling rule list that begins with and is compatible with satisfies
is a lower bound on the objective value of any compatible falling rule list that begins with , which we call a prefix bound for , under the instance of Program 2.9. Furthermore, if
Let be the set of (hypothetical and non-hypothetical) falling rule lists that begin with and are compatible with , and let be the subset of , consisting of those falling rule lists in that have exactly rules (excluding the final else clause) following the prefix .
Case 1. .
which implies that is indeed compatible with .
Conversely, for any , we must have
which implies . This establishes .
Let be the subset of , consisting of those falling rule lists
with and . Note that for any , we have either or , and Lemma 4.4 implies . This means
Using and (36), we can write the right-hand side of (35) as
The rest of the proof for this case proceeds in three steps.
Step 1. Compute .
Since the contribution by the final else clause to is given by
Step 2. Determine a lower bound of for all .
Let . Since the contribution by both the -th rule and the final else clause to is given by , where and are defined by Equation (13) and are given by
(because we have and for ), it is not difficult to see
Substituting (30) in Observation 10.2 and (31) in Observation 10.3 into Equation (39), we have
Note that Equation (40) shows that given the prefix , is a function of and of . Since we have
because holds for any , and
Using (35), (37), (38), and (41), we have
Case 2. .
This implies for all . By Lemma 4.4, we have
Since is given by Equation (38), we have
Given , we must also have
Substituting (43) into (42) completes the proof for Case 2.
Finally, if Inequality (34) holds, then we have
Proof of Theorem 5.2
Theorem 5.2. Suppose that we are given an instance of Program 5.1 and a prefix that is compatible with . Then any rule list that begins with and is compatible with satisfies
is a lower bound on the objective value of any compatible rule list that begins with , under the instance of Program 5.1. In Equation (44), , , and are defined by
To prove Theorem 5.2, we need the following lemma:
Lemma. Suppose that we are given an instance of Program 5.1, a prefix that is compatible with , and a (possibly hypothetical) rule list that begins with and is compatible with . Then there exists a rule list , possibly hypothetical with respect to , such that begins with , has at most one more rule (excluding the final else clause) following , is compatible with , and satisfies
Case 1. There exists some that satisfies and some that satisfies . For any with , the contribution by the -th rule to , defined by the right-hand side of Equation (13) with , is given by
For any with , the contribution by the -th rule to is given by
The rest of the proof for this case proceeds in four steps.
Step 1. Construct a hypothetical rule list that begins with , has exactly one more rule (excluding the final else clause) following , and is compatible with . In later steps, we shall show that the rule list constructed in this step satisfies (45).
Let be the hypothetical rule list of size that is compatible with , and whose -th antecedent is defined by
Step 2. Show that the empirical risk of misclassification by the rule list is the same as that by the rule list .
To see this, we observe that the training instances in captured by in are exactly those captured by the antecedents , , in whose empirical positive proportion satisfies , and the training instances in captured by (i.e. the final else clause) in are exactly those captured by the antecedents , , in whose empirical positive proportion satisfies . This observation implies
Since is compatible with , using the definition of a compatible rule list in Definition 2.6 and the definition of the empirical positive proportion in Definition 2.5, together with (46), (48), (49), and (50), we must have
This means that the contribution by the -th rule to is given by
where we have used (47), and the contribution by the -st “rule” (i.e. the final else clause) to is given by
It then follows that the empirical risk of misclassification by the rule list is the same as that by the rule list :
Step 3. Show that the monotonicity penalty of the rule list is at most that of .
Let be the monotonicity penalty of the rule list . We now show . Let be the monotonicity penalty for the -th rule in .
Let be any integer with
Then the total monotonicity penalty for all the rules in with and satisfies
On the other hand, the monotonicity penalty for the -th rule in satisfies
because we have ( and begin with the same prefix ), and
It then follows from (55) and (56) that the monotonicity penalty of is at most that of :
Using (51) and (58), together with the observation , we must also have
Case 2. Either holds for all , or holds for all . The construction of and the proof for is similar to those given in the proof of Lemma 4.4. The proof for is similar to that in Case 1. The desired inequality then follows from . ∎
Before we proceed with proving Theorem 5.2, we make the following four observations. Observations 11.1, 11.2, and 11.3 are the same as Observations 10.1, 10.2 and 10.3. They are repeated here for convenience.
that begins with a given prefix , we have
Observation 11.2. For any rule list , we have
that has exactly one rule (excluding the final else clause) following a given prefix , we have
that has exactly one rule (excluding the final else clause) following a given prefix , we have
Applying Equations (63) and (64) in Observation 11.3, we have
Applying Equation (62) in Observation 11.2, we have
Let be the set of (hypothetical and non-hypothetical) rule lists that begin with and are compatible with , and let be the subset of , consisting of those rule lists in that have exactly rules (excluding the final else clause) following the prefix . Let be the subset of , consisting of those rule lists
with and .
The lemma that we have proved in this section, along with its proof, implies
This is because if obeys Case 1 in the proof of the lemma, then using the same argument as in the proof of the lemma we can construct a rule list that satisfies
combining the inequalities in (68) and (69) gives us (67). On the other hand, if obeys Case 2 in the proof of the lemma, then by the lemma itself we know
Since we have , it is straightforward to see
Combining the inequalities in (70) and (71) again gives us (67).
Note that if is not empty, then the right-hand side of (67) can be expressed as
The rest of the proof proceeds in six steps.
Step 2. Partition the set into three subsets based on how the softly falling objective is computed.
For any , the softly falling objective is given by
where and are defined by Equation (13) and are given by
(because we have and for ).
Let . By the definition of , we have
To prove (76), we use Definition 2.5 as well as (63) and (65) in Observation 11.3 to obtain
To do so, we substitute (62) and (63) in Observations 11.1 and 11.2 into (74) to obtain
because holds for any , and
Let . By the definition of , we have
To do so, we substitute (62) and (63) in Observations 11.1 and 11.2 into (74) to obtain
Since obeys (81), in particular, it obeys , we have
Let . By the definition of , we have
where the last equality follows by substituting (62) and (63) in Observations 11.1 and 11.2 into (86). Using (85) and applying the same argument as in Step 4, the quantity labeled (87) is also lower-bounded by
Suppose, first, that is not empty.
In the case where is not empty, we observe the following inequality
In the case where is not empty, we observe the following inequality
both of which are lower-bounded by the quantity labeled (91) because of (89) and (88).
Combining (67), (72), (73), and (92), we have
Finally, we compute analytically. Since the derivative of is given by
and must be positive, the only stationary point of that could satisfy the constraint is given by
and the second derivative test confirms that is a local minimum of . It then follows that is given by
Additional Rule Lists Demonstrating the Effect of Varying Parameter Values
In this section, we include some additional rule lists created using Algorithm FRL and Algorithm softFRL with varying parameter values. The default parameter values we used in creating these rule lists are , , and . In each of the following subsections, the rule lists were created with default parameter values, other than the parameter that was being varied.
Running Algorithm FRL with on the bank-full dataset produces the following falling rule list:
Running Algorithm FRL with on the bank-full dataset produces the following falling rule list:
Running Algorithm FRL with on the bank-full dataset produces the following falling rule list:
Running Algorithm FRL with on the bank-full dataset produces the following falling rule list:
As the positive class weight increases, the falling rule list created using Algorithm FRL tends to have rules whose probability estimates are smaller. This is not surprising – a larger value of means a smaller threshold , and by including rules whose probability estimates are not much larger than the threshold, the falling rule list produced by the algorithm will more likely predict positive, thereby reducing the (weighted) empirical risk of misclassification. Note that Algorithm FRL will never include rules whose probability estimates are less than the threshold (see Corollary 4.5).
2 Effect of Varying w𝑤w on Algorithm softFRL
Running Algorithm softFRL with on the bank-full dataset produces the following softly falling rule list:
Note that there is an extra column “positive proportion” in a table showing a softly falling rule list. This column gives the empirical positive proportion of each antecedent in the softly falling rule list. When the probability estimate of a rule is less than the positive proportion of the antecedent in the same rule, we know that the softly falling rule list has been transformed from a non-falling compatible rule list, and that the monotonicity penalty has been incurred in the process of running Algorithm softFRL.
Running Algorithm softFRL with on the bank-full dataset produces the following softly falling rule list:
Running Algorithm softFRL with on the bank-full dataset produces the following softly falling rule list:
Running Algorithm softFRL with on the bank-full dataset produces the following softly falling rule list:
As the positive class weight increases, the softly falling rule list created using Algorithm softFRL also tends to have rules whose probability estimates are smaller. This is again not surprising – a larger value of means a smaller threshold , and by including rules whose probability estimates are not much larger than the threshold, the softly falling rule list produced by the algorithm will more likely predict positive, thereby reducing the (weighted) empirical risk of misclassification.
3 Effect of Varying C𝐶C on Algorithm FRL
Running Algorithm FRL with on the bank-full dataset produces the following falling rule list:
Running Algorithm FRL with on the bank-full dataset produces the following falling rule list:
Running Algorithm FRL with on the bank-full dataset produces the following falling rule list:
As the cost of adding a rule increases, the size of the falling rule list created by Algorithm FRL decreases, as expected.
4 Effect of Varying C𝐶C on Algorithm softFRL
Running Algorithm softFRL with on the bank-full dataset produces the following softly falling rule list:
Running Algorithm softFRL with on the bank-full dataset produces the following softly falling rule list:
Running Algorithm softFRL with on the bank-full dataset produces the following softly falling rule list:
As the cost of adding a rule increases, the size of the softly falling rule list created by Algorithm softFRL decreases, as expected.
Running Algorithm softFRL with on the bank-full dataset produces the softly falling rule lists shown in Tables 16, 17, and 18.
When the monotonicity penalty is small, the softly falling rule list created by Algorithm softFRL exhibits the “pulling down” of the empirical positive proportion for a substantial number of rules, because with little monotonicity penalty the algorithm will more likely choose a rule list that frequently violates monotonicity but that has a small empirical risk on the training set, in the hope of getting more of the training instances “right”. This is also why the softly falling rule list tends to be longer when is small: in minimizing the empirical risk on the training set with little regularization (the default is very small), the algorithm tends to overfit the training data.
When becomes larger, the softly falling rule list created by Algorithm softFRL exhibits less “pulling down” of the empirical positive proportion. This is consistent with our expectation that when is larger, the penalty for violating monotonicity is higher and the algorithm will less likely choose a rule list that frequently violates monotonicity.
Additional Experiments Comparing Algorithm FRL and Algorithm softFRL to Other Classification Algorithms
Figure 3 shows the ROC curves on the test set using different values of , for four additional training-test splits. As we can see, the curves in Figure 3 lie close to each other, again demonstrating the effectiveness of our algorithms in producing falling rule lists that, when used as classifiers, are comparable with classifiers produced by other widely used classification algorithms, in a cost-sensitive setting.
Additional Experiments Comparing Bayesian Approach to Our Optimization Approach
We conducted a set of experiments comparing the Bayesian approach to our optimization approach. We trained falling rule lists on the entire bank-full dataset using both the Bayesian approach and our optimization approach (Algorithm FRL), and plotted the weighted training loss over real runtime. In particular, for each positive class weight , we set the threshold to (By Theorem 2.8, this is the threshold with the least weighted training loss for any given rule list), and computed the weighted training loss using this threshold. For the Bayesian approach, we recorded the runtime and computed the weighted training loss for every iterations of Markov chain Monte-Carlo sampling with simulated annealing, up to iterations. For our optimization approach, we ran Algorithm FRL for iterations and recorded the runtime and the weighted training loss whenever the algorithm finds a falling rule list with a smaller (regularized) weighted training loss. Since we want to focus our experiments on the efficiency of searching the model space, the runtimes recorded do not include the time for mining the antecedents. Due to the random nature of both approaches, the experiments were repeated several times.
Figures 4 to 7 show the plots of the weighted training loss over real runtime for the Bayesian approach and our optimization approach (Algorithm FRL), for four additional runs of the same algorithms. Due to the random nature of both approaches, it is sometimes possible that our approach (Algorithm FRL) may find in iterations a falling rule list with a slightly larger weighted training loss, compared to the Bayesian approach with iterations (see Figure 6(d)). However, in general, our approach tends to find a falling rule list with a smaller weighted training loss faster, due to aggressive pruning of the search space.
It is worth pointing out that both the Bayesian approach and our optimization approach produce similar falling rule lists. Table 19 shows a falling rule list for the bank-full dataset, obtained in a particular run of the Bayesian approach with iterations. Table 20 shows a falling rule list for the same dataset, obtained in a particular run of Algorithm FRL with iterations and the positive class weight . As we can see, the top four rules in both falling rule lists are identical. Tables 21 and 22 show another pair of falling rule lists obtained using both approaches in different runs, and in this case, both approaches have identified some common rules for a high chance of marketing success. This means that both the Bayesian approach and our optimization approach tend to identify similar conditions that are significant, but our approach has the added advantage of faster training convergence over the Bayesian approach in general.