RuleFit
RuleFit combines the models we have built so far. First, an ensemble of trees generates candidate decision rules. Each path becomes a binary feature: one when every condition is true, zero otherwise. Then a sparse linear model is fit using both the original features and those rule features.
This gives the linear model access to interactions. Instead of engineering young applicant AND missed payment by hand, a tree can discover that combination and pass it into the regression.
Prediction equation
A regression RuleFit model has the form:
is a rule indicator. If the rule applies, its coefficient is added to the prediction.
RuleFit Algorithm
A decision rule is turned into a binary feature: it returns 1 when every condition holds, 0 otherwise. That single number is then used as an input alongside the original features.
1
All conditions of rule are met
0
Otherwise
Does this applicant trigger the rule?
Low debt, no misses
debt 28% · missed 0
0
rule silent
High debt, no misses
debt 55% · missed 0
0
rule silent
High debt + misses
debt 55% · missed 2
1
rule fires
Lasso regularization is doing important work again. A tree ensemble can generate thousands of candidate rules. The sparse linear stage removes most of them, leaving a smaller collection of original effects and interactions.
Overlapping rules blur the story
One applicant may trigger several similar rules: debt above 40%, debt above 45%, and debt above 40% with a missed payment. You can still add the contributions exactly, but the explanation becomes repetitive and sensitive to small threshold changes.
In RuleFit, what value does a rule feature take when all of its conditions are satisfied?
When would you choose RuleFit over a plain sparse linear model?