Machine Learning Algorithm Quizzes
Random Forest
Question 1
Random Forest is an ensemble learning method based on which technique?
Question 2
Which line of code correctly imports the Random Forest model for a classification task from scikit-learn?
Question 3
The hyperparameter __________ in scikit-learn's RandomForestClassifier controls the number of decision trees to be built in the forest.
Question 4
How does Random Forest primarily reduce the overfitting that is common in single Decision Trees?
Question 5
For a classification problem, how does a trained Random Forest model typically make its final prediction?
Question 6
The Out-of-Bag (OOB) score, which can be enabled by setting oob_score=True, provides an unbiased estimate of the model's performance on __________ data.
Question 7
What is the primary trade-off when choosing a Random Forest over a single Decision Tree?
Question 8
Which of the following hyperparameters are commonly tuned in a Random Forest to control the complexity of the individual trees within the forest?
Question 9
After fitting a RandomForestRegressor as model, how do you access the feature importance scores?
End of Quiz
Your final score is: 0 / 0
List of Questions
Question 1: Random Forest is an ensemble learning method based on which technique?
Answers: Bagging.
Question 2: Which line of code correctly imports the Random Forest model for a classification task from scikit-learn?
Answers: from sklearn.ensemble import RandomForestClassifier.
Question 3: How does Random Forest primarily reduce the overfitting that is common in single Decision Trees?
Answers: By averaging the predictions of many diverse, decorrelated trees., By introducing randomness through bootstrapping and feature subsampling..
Question 4: For a classification problem, how does a trained Random Forest model typically make its final prediction?
Answers: It takes a majority vote among the predictions of all individual trees..
Question 5: What is the primary trade-off when choosing a Random Forest over a single Decision Tree?
Answers: Loss of direct interpretability for an increase in predictive accuracy and robustness..
Question 6: Which of the following hyperparameters are commonly tuned in a Random Forest to control the complexity of the individual trees within the forest?
Answers: max_depth, min_samples_leaf, max_features.
Question 7: After fitting a `RandomForestRegressor` as `model`, how do you access the feature importance scores?
Answers: model.feature_importances_.