# How to deal with count data in random forest

I am working on a classification model where my target class is a biased class with the class shape as

    0     1
20694   101


Most of my features are the count of number of times a certain event was triggered. While exploring these features I found that my target variable is only associated with certain values of features. For example as below

                 0         1
Feature V1
0                12014    75
1                6490     16
2                1177     6
3                402      2
4                176      2
5                100
6                84
7                61
8                39
9                23
10               26
11               14


As we can see that 1 only occurs when V1 has value of 0 to 4.Thus for any unseen data my model would always predict 0 whenever V1 has value greater than 4.

I thought of using bestNormalize package, however the transformations it is suggesting looses correlation when applied to the data.

Any suggestion would be of great help.

P.S. Happy to share the data if required.

3. Just because this data set only shows a particular relationship between values of V1 and target does not mean it is always the case - especially if your model is to be deployed for a period of time. The relationship may change over time so do not rush to artificially curtail your model.
I think SMOTE is the best approach to try out first and if you want to try further look into the XGBoost parameters especially Scale_pos_weight is the ratio of number of negative class to the positive class.