0
$\begingroup$

I have built a logistic regression model to predict the probability that the event for my dataset occurs.

I also want to know the predicted amount (a regression problem) associated with that event (a customer buying my product).

Incumbent with the logistic model is including event and non-event outcomes. Is the same true for a regression (not classification) problem? Should I include in my linear model customers who didn't buy another product (and thus spent 0 dollars)? Or would that be sort of "double-dipping" if I went to multiply the likelihood * amount for an expected value of a given customer?

$\endgroup$
2
$\begingroup$

There's nothing wrong with using a sequence of prediction models to 1: predict whether or not a product is purchased (binary outcome) then 2: if consumer buys product, predict quantity/volume purchased. The second model is referred to as a conditional model, since you are conditioning on the fact that some quantity/volume of product is purchased. It makes sense to train the second model using only the subset of the training dataset that purchased products. You should inspect a number of measures to assess both models 1 and 2 as well as their overall performance to decide whether the predictive accuracy is acceptable.

$\endgroup$
  • $\begingroup$ Rats, you beat me by 2 minutes. That's what I get for answering such a new question. $\endgroup$ – Kodiologist Aug 22 '17 at 17:26
  • $\begingroup$ Goodness of fit can be badly biased as a measure of predictive accuracy, though. Did you mean looking at goodness of fit inside cross-validation? We wouldn't usually call that "fit", I think. $\endgroup$ – Kodiologist Aug 22 '17 at 17:28
  • 1
    $\begingroup$ @Kodiologist thanks for the suggested edit. I agree. $\endgroup$ – AdamO Aug 22 '17 at 18:48
2
$\begingroup$

Since you want to predict the amount spent rather than just whether any amount is spent at all, logistic regression won't cut it. You want a model in which the amount itself is a dependent variable, such as linear regression. If lots of subjects don't buy anything, a zero-inflated model could be helpful. You can keep using logistic regression if you use a two-stage compound model in which you predict whether subjects buy anything, then, among those for whom you predicted a purchase, predict the actual amount spent with another model.

$\endgroup$
  • $\begingroup$ I must not have been clear above. I have two models: 1) logistic for the likelihood of buying and 2) linear for predicting the continuous amount spent. My plan is to do the compound model - I was just checking whether I should exclude from my continuous-variable modeling exercise those customers who didn't spent anything (the $0s). $\endgroup$ – blacksite Aug 22 '17 at 17:49
  • $\begingroup$ @blacksite Oh, I see. Yes, because in practice the second part will only see subjects who you predicted to not spend any money, you should train it with only the nonzeros, like AdamO said. $\endgroup$ – Kodiologist Aug 22 '17 at 17:51

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.