# Determine root node in a regression tree that has both continuous and categorical variable

I want to create a regression tree from a dataset that has predictors of continuous and categorical variables. For ex: to predict the profit of a company based on State(categorical) & Total Amount invested in R&D(Continuous). My question is how will the algorithm decide which variable to pick first as its root node? What technique is used to select the categorigal and continuos variable.

• Perhaps you could expand on this question a little, and tell us what you understand and don't understand? Also, since this looks like self-study or homework, you should add the "self-study" tag. – jbowman Feb 13 '18 at 19:29
• Is this a question from a course or textbook? If so, please add the [self-study] tag & read its wiki. – gung - Reinstate Monica Feb 15 '18 at 15:43