Skip to content
Machine Learning

Imagine you are applying a decision-tree-based model to a numerical dataset and you run an experiment where you scale the features. Which model would give better results, the original or the scaled one?

They should give the same result because tree-based models are scale invariant.

datasciencetrivia.com

Card 1 of 276. Answer: They should give the same result because tree-based models are scale invariant.

Created by santiviquez

About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.

The longer answer

Neither: they should give the same results. A decision tree splits on rules like feature ≤ threshold, and the best split depends only on how the rows are ordered by that feature, not on its units. Standardization and min-max scaling preserve that order for each feature, so they produce the same tree.

Example: incomes of 20,000, 35,000, 50,000 and 90,000, with a split at income ≤ 42,500 separating the first two rows. Measured in thousands, the split becomes income ≤ 42.5, with the same rows on each side and the same impurity reduction. Every candidate split maps one to one, so random forests and gradient boosting are unaffected too.

The precise property is invariance to monotonic transformations of each feature, with one edge case. A log transform keeps the order too, but a threshold halfway between log(35,000) and log(50,000) corresponds to about 41,833, so a new income of 42,000 is routed differently. Otherwise scaling matters only for other models in the pipeline, such as KNN or neural networks.

All questions