• Aucun résultat trouvé

Learning Optimal Decision Trees Using Constraint Programming

N/A
N/A
Protected

Academic year: 2022

Partager "Learning Optimal Decision Trees Using Constraint Programming"

Copied!
2
0
0

Texte intégral

(1)

Learning Optimal Decision Trees using Constraint Programming

H´el`ene Verhaeghe1, Siegfried Nijssen1, Gilles Pesant2, Claude-Guy Quimper3, and Pierre Schaus1

1UCLouvain, ICTEAM, Place Sainte Barbe 2, 1348 Louvain-la-Neuve, Belgium, {firstname.lastname}@uclouvain.be

2Polytechnique Montr´eal, Montr´eal, Canada,gilles.pesant@polymtl.ca

3Universit´e Laval, Qu´ebec, Canada,claude-guy.quimper@ift.ulaval.ca

Abstract. Decision trees are among the most popular classification models in machine learning. Using greedy algorithms to learn them can pose several disadvantages: it is difficult to limit the size of the decision trees while maintaining a good classification accuracy, and it is hard to impose additional constraints on the models that are learned. For these reasons, there has been a recent interest in exact and flexible algorithms for learning decision trees. This paper is a summary of our paper ”Learn- ing Optimal Decision Trees using Constraint Programming” accepted in CP2019 [4]. In our paper, we introduce a new approach to learn decision trees using constraint programming.

Decision trees are popular classification models in machine learning. Benefits of decision trees include that they are relatively easy to interpret and that they provide good classification performance on many datasets.

Several methods have been proposed in the literature for learning decision trees. The greedy methods are the most popular ones. These methods recursively partition a dataset into two subsets based on a greedily selected attribute until some stopping criterion is reached (such as a minimum number of examples in the leaf, or a unique class label in these examples). While in practice these methods obtain a good prediction accuracy for many types of data, unfortunately, they provide little guarantees. As a result, the trees learned using these methods may be unnecessarily complex, may be less accurate than possible, and it is hard to impose additional constraints on the trees.

To address these weaknesses, researchers have studied the inference ofoptimal decision trees under constraints [2]. These approaches ensure that under well- defined constraints and optimization criteria, an optimal tree is found.

Our paper proposes a new, more scalable approach based on Constraint Pro- gramming (CP) for learning decision trees with a fixed maximum depth mini- mizing the classification error. Our approach combines these key ideas: the use of branch-and-bound in a CP solver, the use of theCoverSizeglobal constraint Copyright c2019 for this paper by its authors. Use permitted under Creative Com- mons License Attribution 4.0 International (CC BY 4.0).

(2)

2 H´el`ene Verhaeghe et al.

[3], the use of an AND/OR search tree [1] and the use of caching as introduced in DL8 [2]. This allows our constraint programming approach to deal in a much more efficient way with the decompositions in the learning problem. We will show that the combination of these different ideas leads to a model that is more efficient than other approaches proposed in the literature.

The main decision variables required to model our decision tree are the de- cisions taken at each node. Another set of variables is used to count the trans- actions matching at each node of the tree. The integrity of the tree is ensured by the use ofAllDifferentconstraints,CoverSizeconstraints and simple arith- metic constraints linking the various variables. Other redundant constraints are added to help speed up the resolution.

We compared our methods to DL8 [2] and BinOCT [5], two methods address- ing the same problem. Our method outperforms these two others on most of the instances. It could find and prove optimality on roughly 75% of the instances within the time limit. The best solution found was reached by our method in almost all cases. However, DL8 performs better on small instances. The large difference between BinOCT and our method can be explained by the benefits of the AND/OR search that is not used by BinOCT. The gap with DL8 can be partially explained by the cost pruning. It can potentially also be explained by the itemset mining algorithms used: DL8 lacks the optimizations found in the CoverSize constraint. Our experiments also evaluate the effects of some of the techniques used to solve the problem, such as the use of a cache.

In summary, our paper presents a new approach for efficiently creating an optimal decision tree of limited depth. This approach based on CP combines the CoverSize global constraint, the concept of AND/OR tree and caching. On most of the benchmarks, it gives the best solution within the allocated time and is the fastest to prove optimality. We believe our approach can be extended in many different ways (multiclass, continuous features through binarization,...).

References

1. Dechter, R., Mateescu, R.: And/or search spaces for graphical models. Artificial intelligence171(2-3), 73–106 (2007)

2. Nijssen, S., Fromont, E.: Mining optimal decision trees from itemset lattices. In:

Proceedings of the 13th ACM SIGKDD international conference on Knowledge dis- covery and data mining. pp. 530–539. ACM (2007)

3. Schaus, P., Aoga, J.O., Guns, T.: Coversize: a global constraint for frequency-based itemset mining. In: International Conference on Principles and Practice of Con- straint Programming. pp. 529–546. Springer (2017)

4. Verhaeghe, H., Nijssen, S., Pesant, G., Quimper, C.G., Schaus, P.: Learning op- timal decision trees using constraint programming. In: Principles and Practice of Constraint Programming - CP 2019, 25th International Conference, Stamford, USA, September 30 - October 4, 2019 (2019)

5. Verwer, S., Zhang, Y.: Learning optimal classification trees using a binary linear program formulation. In: 33rd AAAI Conference on Artificial Intelligence (2019)

Références

Documents relatifs

Abstract This paper deals with the problem of outsourcing the debt for a big investment, according two situations: either the firm outsources both the invest- ment (and the

Cette attitude à vouloir qualifier les liens dans l’activité de l’assistant social relève l’importance de la valeur de la relation dans l’accompagnement de la personne,

A large number of extensions of the decision tree algorithm have been proposed for overfitting avoidance, handling missing attributes, handling numerical attributes, etc..

To keep the structure in a consistent state it is possible to change information only in the root cluster or in the external boundary vertex.. So the top tree must be rebuilt by

Using this selection criterion (the subset criterion), the test chosen for the root of the decision tree uses the attribute and subset of its values that maximizes the

Overall, our encoding requires O(2 K (F +C +log(T max ))) decision variables and O(R +2 K (F ·T all +C)) constraints, where K is the tree depth, F is the number of features, C is

According to [14], the rpart programs build classification or regression models of a very general structure using a two stage procedure; the resulting models can be represented

The results include the minimization of average depth for decision trees sorting eight elements (this question was open since 1968), improvement of upper bounds on the depth of