The task you are converting is not actually classification per se, it's ordinal classification. I am pointing this out cause there are implementations whichthat specialise onin this matter. Moreover, the task you are asking is how to properly bin
the values. For that, you can refer to binning as a pre-processing step. I am sure if you search for "binning python" for instance, you will find various implementationimplementations.