Converting continuous to categorical variable
Whenever I want to convert a continuous feature into categorical with bins, I use one of the following two ways.


Freedman–Diaconis rule (wikipedia source)


Bin width = 2 x IQR(x) x n^(-1/3)

Where IQR(x) is max-min and n is the number of your observations in your sample.


Frequency Bins


You get such a bin width that each of them will have the same number of observations. 

I don't have a rule of thumb, where to use each of them. I usually try both and measure the impact on accuracy. Then decide which I will use in the final model.