I have some numeric data that has come 'binned', but the bins are not of equal sizes in terms of scale or quantileFor example, an age variable that is [0-16), [16-21), [21-30), [30-45), [45-65), [65, ]If I leave it as a categorical variable, a tree will treat each category separately and discount the ordered relationship between the factors.If I change it to an ordinal variable, e.g. [0, 1, 2, 3, 4, 5] and keep an array of labels for later reporting, the tree might split on, e.g. <2.5, which seems more natural to me, but then again the distance between 1 and 2 is not the same as the distance between 2 and 3 by any measure.I'm leaning towards the second solution, but I would love some input!
What's the best way to use binned data in a tree-based model?
random forest;feature extraction;categorical data;decision trees