# Classification and regression tree at once

I would like to understand if there is a machine learning algorithm that is able to handle both, polytomous (categorical) and continuous independent variables at once, to predict a continuous dependent variable.

For instance, the dataset would look something like:

• Independent variables: Age (non categorical), Sex (categorical), Native country (categorical), Work hours per week (non categorical).
• Dependent variable: Income.

If there is not such an algorithm to predict using at once categorical and non categorical variables, which approach you would suggest to solve this problem?

Many thanks.

• Many software packages reduce continuous information to ordinal buckets, sometimes deciles depending on the algorithm. – Mike Hunter Apr 4 '16 at 16:44
• The Classification and Regression part of Classification Tree and Regression Tree refer to the type of the Dependent variable, their output, and not their input. They are both capable of handling different type of input variable. However, you should check what assumption the algorithm/implementation you use makes (for exemple, linear regression assumes a linear relationship between the inputs and the outputs). – Winks Apr 4 '16 at 16:54
• Most supervised learning algorithms can use both categorical and continuous variables. You'll just have to create dummy variables for the categorical variables before fitting. – ams Apr 4 '16 at 19:30
• Thanks everyone. It was helpful and now I understand where was my conceptual mistake. I will use dummy variables in the input of my tree for the categorical variables. – Newbie Apr 21 '16 at 18:49