1
$\begingroup$

I'm working on trying to model the profitability of a set of customers given a vector of behaviors.

This data includes both customers who did and did not make a purchase. As a result, the DV (profit) is heavily zero-inflated. I've used hurdle models to capture the joint distribution of this outcomes, but in my current problem, I'm currently restricted to only using a tree based model. To that extent, I can only use a single tree.

Are there any tree based models that can accommodate this type of joint distribution?

One possible solution I thought of is to change all of the zeros to an extreme negative number (e.g., -9999). This will max the difference between any observation with a positive value and any zero to try and manipulate the distance. My hope is that I can artificially force a majority of the 0's into a single node and have the algorithm do it's best to discriminate profit values within the non-zero node.

$\endgroup$

1 Answer 1

1
$\begingroup$

If I understand you correctly, you want to force one node to lead to predicted value of 0. What you can do is change your dependent variable into a binary value, did they purchase, and build a classification tree predicting whether or not a person purchased. You can then subset your data to only those who purchased and build a tree that predicts the amount purchased assuming they've purchased. You can then paste these two trees together (i.e, the final node in the classification tree is the beginning of the "amount purchased" tree). Basically, a two-step tree procedure.

$\endgroup$
2
  • $\begingroup$ I've thought about that, but, due to lack of experience with decision trees, I'm not sure exactly how the estimates would work. With a classification tree, I don't get a node with only a certain group of discrete values, Instead I get a ratio of 1 to 0s. Is multiplying this value through the subtree you suggested different than estimating the two groups independently and multplying the outcome? $\endgroup$
    – Bradley
    Oct 14, 2015 at 20:53
  • $\begingroup$ The two-part tree procedure suggested by @TrynnaDoStat is very close to the tree-based version of a hurdle model. One part would be the binary zero hurdle (purchase yes/no) and the second part would be the model for the log(amount) of those who did purchase. The first part would be a binary classification tree (yielding predicted probabilities) and the second part would be a regression tree (yielding a predicted log-amount). In principle, any classification and regression tree procedure could be used that you feel comfortable with, e.g., in R rpart or partykit etc. $\endgroup$ Oct 16, 2015 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.