226k views
2 votes
What is the difference between a classification tree and a regression tree?

User Ja
by
8.7k points

1 Answer

7 votes

Final answer:

A classification tree is used when the output variable is categorical or discrete, while a regression tree is used when the output variable is continuous.

Step-by-step explanation:

A classification tree and a regression tree are both types of decision trees, but they are used for different purposes. A classification tree is used when the output variable is categorical or discrete, and the goal is to classify data into predefined classes or categories. On the other hand, a regression tree is used when the output variable is continuous, and the goal is to predict a numerical value.

For example, let's say we have a dataset of car characteristics such as engine size, horsepower, and weight, and we want to predict the price of the car. In this case, we would use a regression tree. However, if we want to classify cars into different categories such as small, medium, or large based on their size, we would use a classification tree.

User Ray Suhyun Lee
by
8.2k points