Optimization of Tree Ensembles
Real World Problem
But also want to know the strategy to make some differences (a.k.a. modify the sample)
When applying a classifier,
sometimes we not only just want to know whether a sample belongs to a class
Examples
- Medical attention
- Company decision
First step
Problem Definition
Given us a classifier C(⋅), and an n-features vector X={x1,x2,...,xn}
The object is to find another X′ so that X′=argX′maxC(X′)
How?
Focus on single model
Random Forest
Random Forest
RF is C(X)=t=1∑Tλtft(X) here fi(⋅) is a tree in the forest.

Example from Iris dataset
How to formulate the problem?
idea: consider it to be a MIP problem
Terminology
Let leaves(t) be the set of leaves or terminal nodes of tree t.
Let splits(t) denote the set of splits of tree t (non-terminal nodes).
Let left(s) be the set of leaves that are accessible from the left branch, and same as the right(s)
let V(s)∈{1,...,n} denote the variable that participates in split s,
and let C(s) denote the set of values of variable i that participate in the split query of s.
Object function
x,ymaxt=1∑Tℓ∈leaves(t)∑λt⋅pt,ℓ⋅yt,ℓ
Constraints
- the observation falls in exactly one of the leaves of each tree t
- if 1 observation falls into the a sub-tree, then no observation could fall into the other part of sub-tree
- the indicator y must be in {0, 1}
Intermediate variable
xi,j indicates that if a feature Xi fulfills the predicate of that node, i.e. Xi falls into left branch of the tree
the observation falls in exactly one of the leaves of each tree t
if 1 observation falls into the a sub-tree, then no observation could fall into the other part of sub-tree
Some additional constraints on x
the indicator y must be in {0, 1}
Trick kicks in!
All in one
Approximation
It's quite time-consuming to solve the original problem
Traverse the whole forest, O(k*2^n)!
Idea: what if we do not search to the deepest of the tree?
Ω={(t,s)∣t∈{1,...,T},s∈splits(t)}
First define
Proposion
Where Z is the objective value
Theorem

Experiments

Experiments

Experiments

Optimization of Tree Ensembles
By Weiyüen Wu
Optimization of Tree Ensembles
- 663