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.

  • $\begingroup$ Many software packages reduce continuous information to ordinal buckets, sometimes deciles depending on the algorithm. $\endgroup$ – Mike Hunter Apr 4 '16 at 16:44
  • $\begingroup$ 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). $\endgroup$ – Winks Apr 4 '16 at 16:54
  • $\begingroup$ 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. $\endgroup$ – ams Apr 4 '16 at 19:30
  • $\begingroup$ 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. $\endgroup$ – Newbie Apr 21 '16 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.