1
$\begingroup$

I would like some insight and some typical "rules of thumb" I can use to decide when to transform continuous predictors into factors and vice versa for classification and regression trees.

Should I just experiment with different combinations and use the test error rate as a judgment criterion? If so, wouldn't this get impractical as the number of predictors increases?

$\endgroup$
4
  • 1
    $\begingroup$ Isn't the point of trees that cutoffs are found in a data-driven way and do not have to be pre-specified? Why do you want to cut continous variables into factors beforehand? $\endgroup$ Commented Jun 7, 2016 at 5:06
  • $\begingroup$ I'm asking if there is an advantage to it, obviously the less preprocessing I do, the better! $\endgroup$ Commented Jun 7, 2016 at 5:06
  • $\begingroup$ I read your question that you asked how to do the preprocessing and not why. $\endgroup$ Commented Jun 7, 2016 at 5:20
  • $\begingroup$ I said "when" to transform meaning when is it a good idea to do it. $\endgroup$ Commented Jun 7, 2016 at 5:21

1 Answer 1

1
$\begingroup$

The tree-classification algorithm can handle both discrete and continuous. There is no such thing "rule of thumb" when to transform and when not to transform, because it all depends on how you view your data. If you believe your data should be categorical (for example, income-groups), you should use a factor variable. However, if precision is required (eg: income per month), then you'll need to do it continuously.

Ask yourself, if you were a user, which way to view the data would make more sense? For example, when you complete tax-returns, you'd have to give your exact income. However, you'd only need to tell your friend a rough-estimate (eg: 2000-3000 per month).

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.