How to make bins for a continuous variable by looking at its distribution with the required variable?

kaggle
data_wrangling

#1

Hello,

I was trying to make new variables while solving the bike sharing demand problem on kaggle. I wanted to make bins for the variable hour and create a new variable day_part according to the distribution->

What bins should I make and what technique should I follow for doing it?

Thanks


#2

@adityashrm21,

One of the solution, I used a lot is “Decision trees”. It splits the node efficiently and takes less time to deliver results.

Regards,
Imran