1. Home
  2. Data Science
  3. Scikit-learn
  4. RandomForestClassifier(oob_score=True) requires which…

Added 30 Nov -0001

RandomForestClassifier(oob_score=True) requires which condition to produce a meaningful out-of-bag score?

  1. max_features must equal the total number of features, so that every split always sees the whole feature set
  2. The number of trees must be less than the number of samples, so that every tree sees fresh data
  3. criterion must be set to entropy, because the Gini criterion cannot track the out-of-bag error
  4. bootstrap=True, since out-of-bag samples exist only when each tree is trained on a bootstrap resample Correct answer

Correct answer

D. bootstrap=True, since out-of-bag samples exist only when each tree is trained on a bootstrap resample

14 views

MCQSEXAM

Explanation

Out-of-bag estimation uses the roughly 37 percent of samples left out of each bootstrap sample as a built-in validation set, so it requires bootstrap=True. The score approximates cross-validation at no extra fitting cost but is noisy with few trees and unreliable when samples are not independent. It is available only on ensembles that resample, not on a single tree.

Reference

Asked in: NTS, PPSC IT, Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Scikit-learn MCQs

Practise all Scikit-learn MCQs

Similar MCQs