AI-900 Practice Question: Describe fundamental principles of machine learning on Azure
What is 'gradient boosting' and how does it differ from random forests?
⚠ Common exam trap
A common mix-up: candidates confuse ensemble methods and assume gradient boosting uses deep learning (like neural networks) or that random forests are always superior, when the core distinction lies in sequential vs. parallel tree construction and the underlying optimization approach.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Gradient boosting trains trees sequentially to correct prior errors; random forests trains trees independently in parallel
Gradient boosting is an ensemble technique that builds trees sequentially, where each new tree attempts to correct the errors (residuals) of the previous trees by optimizing a loss function via gradient descent. In contrast, random forests build multiple decision trees independently in parallel using bootstrapped samples and random feature selection, then average their predictions. This sequential error-correction process is the key difference, making option B correct.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Gradient boosting uses deep neural networks; random forests use shallow trees
Why it's wrong here
Gradient boosting does not use deep neural networks; it builds an ensemble of decision trees, typically shallow ones, and adds them sequentially to reduce residual errors. Random forests also use decision trees, not necessarily shallow ones — their trees are usually grown deep and unpruned, then averaged. The real contrast is algorithmic: boosting is sequential and error-correcting, while random forests are parallel and independent.
- ✓
Gradient boosting trains trees sequentially to correct prior errors; random forests trains trees independently in parallel
Why this is correct
Gradient boosting trains decision trees sequentially: each new tree focuses on the residual errors left by all previous trees, forming a strong additive model. Random forests train many decision trees independently in parallel, using bootstrap sampling and random feature selection, then average their predictions to reduce variance. This makes gradient boosting typically more accurate but slower to train, while random forests are faster and more robust.
- ✗
Random forests always outperform gradient boosting for structured data
Why it's wrong here
No ensemble method universally dominates on structured data. Gradient boosting often achieves high predictive accuracy on tabular data by iteratively correcting mistakes, but it can overfit and is sensitive to hyperparameters. Random forests are more robust, less prone to overfitting, and easier to tune, so the best choice depends on the dataset size, noise level, and computational constraints.
- ✗
Gradient boosting requires GPUs; random forests work only on CPUs
Why it's wrong here
Hardware requirements are implementation details, not fundamental algorithmic differences. Gradient boosting can be trained on CPUs, and many random forest libraries also support GPU acceleration. The actual distinction is that gradient boosting builds trees one at a time, where each new tree fits the residuals of the previous ensemble, whereas random forests build many trees independently and combine their outputs.
Go deeper
Related to this question
About these practice questions
Courseiva writes every AI-900 question from scratch — 985 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AI-900 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-900 exam.