I attended a conference on ML and Data Science and I have a general question that was not answered in the conference.
If we have a continuous variable, let's say age. What is the best way to handle this variable. These are my thoughts, please let me know if they nonsense, but in general I think it is a very important and useful topic that has not been discussed in the detail that I need it:
How should you decide on the number of bins? Would it be best to choose an arbitrary number of bins and then test various combinations, finally settling on the best fit? Should volume in bins be taken into account - for me this is important. What is the best approach to accommodate the volume and number of bins?
When setting the bin width would it make sense to choose various bin widths and do hypothesis testing on the bins deciding on the boundaries based on hypothesis testing (something like a t-test) choosing boundaries once the hypothesis states that the bins are different.
Is it really necessary to split the variable to start with. Specifically, some models can handle continuous variables and some models set the bins.
Would it be a good idea to keep the original continuous variable along with the binned values - I am sure this is not a good idea. But I would like to know exactly why.