PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Machine Learning/Other

Compare trees, RF, and gradient boosting

Last updated: Mar 29, 2026

Quick Overview

This question evaluates understanding of tree-based supervised learning methods—decision trees, random forests, and gradient-boosted trees—including key hyperparameters, bias–variance trade-offs, validation techniques such as out-of-bag estimation, suitability for high-dimensional sparse text features, and detection/mitigation of overfitting.

  • medium
  • Other
  • Machine Learning
  • Data Scientist

Compare trees, RF, and gradient boosting

Company: Other

Role: Data Scientist

Category: Machine Learning

Difficulty: medium

Interview Round: Onsite

Explain decision trees, random forests, and gradient boosted trees. (a) List key hyperparameters for RF (n_estimators, max_features, max_depth, min_samples_leaf, bootstrap, oob_score) and for GBT (n_estimators, learning_rate, max_depth or max_leaf_nodes, subsample, min_child_weight). (b) Explain why shallow trees are typical in boosting but deeper trees can be used in RF; relate to bias–variance. (c) Define out-of-bag estimation and when it can replace a validation set. (d) For high-dimensional sparse text features, which model is preferable and why? (e) Describe how you would detect and mitigate overfitting during boosting.

Quick Answer: This question evaluates understanding of tree-based supervised learning methods—decision trees, random forests, and gradient-boosted trees—including key hyperparameters, bias–variance trade-offs, validation techniques such as out-of-bag estimation, suitability for high-dimensional sparse text features, and detection/mitigation of overfitting.

Related Interview Questions

  • Derive and regularize logistic regression - Other (hard)
  • Design anomaly detection and handle imbalanced logistic regression - Other (Medium)
  • Extract companies from noisy text - Other (hard)
  • Evaluate and select K in K-means - Other (medium)
  • Explain SVM kernels and complexity - Other (hard)
Other logo
Other
Oct 13, 2025, 9:49 PM
Data Scientist
Onsite
Machine Learning
3
0

Decision Trees, Random Forests, and Gradient-Boosted Trees

You are interviewing for a Data Scientist role and are asked to compare common tree-based methods for supervised learning (classification/regression), list key hyperparameters, and reason about bias–variance and validation.

Tasks

(a) Explain decision trees, random forests (RF), and gradient-boosted trees (GBT). Then list key hyperparameters:

  • RF: n_estimators, max_features, max_depth, min_samples_leaf, bootstrap, oob_score.
  • GBT: n_estimators, learning_rate, max_depth or max_leaf_nodes, subsample, min_child_weight.

(b) Explain why shallow trees are typical in boosting but deeper trees can be used in RF. Relate to bias–variance trade-offs.

(c) Define out-of-bag (OOB) estimation and when it can replace a validation set.

(d) For high-dimensional sparse text features, which model is preferable and why?

(e) Describe how you would detect and mitigate overfitting during boosting.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Machine Learning•More Other•More Data Scientist•Other Data Scientist•Other Machine Learning•Data Scientist Machine Learning
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.