I'm working on a problem where my target feature of type integer. i.e (n_clicks). In general, if we want to predict categorical target feature then we use classification algorithms and on the other hand for predicting a target feature of type continuous then we use regression techniques where my output will be -infinity to +infinity. But in my case if I use regression then my output will become a float value. One solution here would be convert the output float values into into integer or by use of pandas.round() to round figure the value.
Is there any alternative way to predict my output variable as an integer ?
UPDATED: As suggested to use POISSON Regression, tried below code but still the output is same. Below is code snippet:
import statsmodels.api as sm x_train_sm = sm.add_constant(x_train) poisson_model = sm.GLM(y_train, x_train_sm, family=sm.families.Poisson()).fit()