DecodeAI
← Question Bank

Machine Learning

Tree Based Methods in Machine Learning

Interview questions on Tree Based Methods in Machine Learning.

17 questions

Random Forest

Q1. Complete the sentence: A random forest is a type of a decision tree which utilizes `[bagging/boosting]`

Sign in to bookmark

Random Forest

Q2. The algorithm depicted in Fig. 6.1 was found in an old book about ensembling. Name the

Sign in to bookmark

algorithm.

Algorithm 1: Algo 1

Data: A set of training data, Q with N elements has been established while K times do Create a random subset of N ′ data by sampling from Q containing the N samples; N′ < N; Execute algorithm Algo 2; Return all N′ back to Q

Algorithm 2: Algo 2

Choose a learner hmh_m; while K times do Pick a training set and train with hmh_m;

Random Forest

Q4. How do you choose between different types of decision tree algorithms (e.g., CART, ID3, C4.5, Random Forest)?

Sign in to bookmark

Random Forest

Q5. What is the difference between a decision tree and a Random Forest?

Sign in to bookmark

Random Forest

Q7. What is the purpose of feature bagging in a Random Forest?

Sign in to bookmark

Random Forest

Q9. What are the advantages of using Random Forests?

Sign in to bookmark

Random Forest

Q10. What is out-of-bag error, and how is it used in Random Forests?

Sign in to bookmark

Random Forest

Q12. Can you explain the concept of feature importance in a Random Forest?

Sign in to bookmark

Random Forest

Q13. What are some potential drawbacks of using Random Forests?

Sign in to bookmark

Random Forest

Q14. When would you choose a Random Forest over other machine learning algorithms?

Sign in to bookmark

Random Forest

Q15. Consider training corpus consisting of balls which are glued together as triangles, each

Sign in to bookmark

of which has either 1,3,6,10,15,21,28,36,or45balls1, 3, 6, 10, 15, 21, 28, 36, \hspace{0.1em}\text{or} \hspace{0.1em} 45 \hspace{0.5em} \text{balls}.

  1. We draw several samples from this corpus as presented in Fig.6.3 where in each sample is equiprobable. What type of sampling approach is being utilized here?
  2. Two samples are drawn one after the other. In which of the following cases is the covariance between the two samples equals zero? - (i) Sampling without replacement - (ii) Sampling with replacement
  3. During training, the corpus sampled with replacement and is divided into several folds as presented in Fig. 6.4.

Random Forest

Q16. There are several methods by which the outputs of base classifiers can be combined to yield a single prediction. Below code snippet depicts part of a specific ensembling approach applied to several CNN model predictions for a labelled data-set. Which approach is being utilized?

Sign in to bookmark
  1. Majority voting for binary classification
  2. Weighted majority voting for binary classification
  3. Majority voting for class probabilities (iv) Weighted majority class probabilities
  4. An algebraic weighted average for class probabilities
  5. An adaptive weighted majority voting for combining multiple classifiers
l=[]
for i,f in enumerate(filelist):
    temp = pd.read_csv(f)
    l.append(temp)
arr = np.stack(l,axis=-1)
avg_results = pd.DataFrame(arr[:,:-1,:].mean(axis=2))
avg_results['image'] = l[0]['image']
avg_results.columns = l[0].columns

Random Forest

Q17. **True or False**: A perfect ensemble comprises of highly correct classifiers that differ as much as possible.

Sign in to bookmark