I’m working on predicting the n_clicks (which is always be an integer). i.e., my target variable will be an Integer and not a float type. For this, I’ve been trying XGBOOST with parameter {objective = “count:poisson”}. That’s working fine. But I try model.predict(x_test) then it is always giving “NAN” values. (please see the screenshot). I couldn’t find any example on Poisson Regression for predicting count data in python and most of the examples are in R language.
Prediction of count data using XGB Poisson Regression
Please remove city_id
from the dataset, since it’s not a continuous feature.
why should we remove the city_id
? it’s a continuous feature and there will be multiple hotels in the same city right?. n_clicks (target feature) may be depends on the city as well right?
city_id
is a categorical feature, since you cannot meaningfully compare two cities as numbers. You should one-hot encode (dummify) the city ID variable.