0
$\begingroup$

I have a dataset with a target variable following Poisson distribution. It starts at 0 and goes until 30. But there are 8300 0's and only 2 30's.

From this data, I need to create a classification model. To do that, I need to decide what the range for each class should be. For instance:

  • 0-1
  • 2-4
  • 5-9
  • 10+

The challenge is that I can train the model very well for the first bin but not that well for the others because of the distribution of the target variable. The only idea is to try different variations of classes and checking their performance. But this is not a time-efficient technique. Does anyone have any idea how to tackle this? Thanks!

$\endgroup$
6
  • 6
    $\begingroup$ Why is this a classification problem and not a regression problem? If the outcome is hypothesized to be poisson, wouldn't it make more sense to do a regression? We could even account for the extra 0s by doing a zero inflated model. $\endgroup$ Aug 8, 2019 at 18:41
  • $\begingroup$ To add to @DemetriPananos 's comment, the typical model for a target variable assumed to be Poisson-distributed would be Poisson regression: en.wikipedia.org/wiki/Poisson_regression $\endgroup$
    – timchap
    Aug 9, 2019 at 14:37
  • $\begingroup$ Thanks for the comments @DemetriPananos and @timchap! The reason is I want to create a confidence interval with the bins. For the purpose of the project, it is more important to predict the closest bin if not the right bin. Predicting bins is more logical for how we will utilize this prediction model. $\endgroup$
    – realkes
    Aug 9, 2019 at 16:32
  • 2
    $\begingroup$ What do you mean by "create a confidence interval with the bins"? Why can't you run a Poisson regression, which outputs a probability for the future realization to take each possible discrete value, then aggregate these probabilities over bins you are interested in? $\endgroup$ Aug 9, 2019 at 17:08
  • $\begingroup$ @ykesen I'm still dubious that classification is the right approach. Can you say more about the data and how the model will be used in practice? $\endgroup$ Aug 9, 2019 at 17:21

1 Answer 1

1
$\begingroup$

You are suffering from class imbalance, because you have many instances to learn from for the first class but very few for the last. To reduce the class imbalance for a discretised continuous target variable like this, one would typically set the bin bounds such that the number of instances in each class is roughly equal. In your case, your bin bounds would probably be logarithmically spaced. You could either try using logarithmic bounds directly or sort your values and find exact cutoffs that give well-balanced classes.

However, as discussed in the comments, a more suitable solution to your problem may be Poisson regression. This is a form of regression which aims to find the mean of your target Poisson random variable as a function of your features (as opposed to linear regression, which effectively aims to find the mean of an assumed normal target variable).

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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