Search⌘ K
AI Features

Regression Trees vs. Classification Trees

Explore the key distinctions between regression and classification trees in this lesson. Understand how regression trees predict numeric values by reducing variance, while classification trees separate categories to improve label purity. Learn to select the appropriate tree type based on your target variable and evaluate models effectively using real-world examples.

A used-car pricing model must return a resale price such as $18,400, while a hospital readmission model must decide whether a patient is likely to return within the defined time horizon. The targets differ before either tree makes a split. Used-car price is a continuous numeric target. Readmission is a categorical target with outcomes such as 0 and 1.

For used cars, mileage, age, and trim_code can lead to different price ranges. A regression tree predicts a numeric target by dividing cars into groups and returning one constant number at each leaf. That number is usually the mean price of the training cars that reach the leaf. If five cars in a leaf sold for $12,000, $13,000, $13,500, $14,000, and $15,000, the leaf predicts their mean for any new car that reaches it.

The baseline predicts the overall mean resale price for every car, regardless ...