DecodeAI
← Question Bank

Machine Learning

Tree Based Methods in Machine Learning

Interview questions on Tree Based Methods in Machine Learning.

31 questions

Ensemble Learning

Q1. Mark all the approaches which can be utilized to boost a single model performance:

Sign in to bookmark
  1. Majority Voting
  2. Using K-identical base-learning algorithms
  3. Using K-different base-learning algorithms
  4. Using K-different data-folds
  5. Using K-different random number seeds
  6. A combination of all the above approaches

Ensemble Learning

Q2. What are the key components of a stacking ensemble?

Sign in to bookmark

Ensemble Learning

Q3. How do you prevent over-fitting in a stacked ensemble?

Sign in to bookmark

Ensemble Learning

Q4. Can you explain the process of creating a stacking ensemble?

Sign in to bookmark

Ensemble Learning

Q5. What is the advantage of stacking over using a single powerful model?

Sign in to bookmark

Ensemble Learning

Q6. What are some popular algorithms used as base models in stacking ensembles?

Sign in to bookmark

Ensemble Learning

Q7. When should you consider using stacking in a machine learning project?

Sign in to bookmark

Ensemble Learning

Q9. Can you explain the difference between stacking and blending?

Sign in to bookmark

Ensemble Learning

Q10. What is the purpose of a meta-model in blending?

Sign in to bookmark

Ensemble Learning

Q12. What are the common algorithms used for blending?

Sign in to bookmark

Ensemble Learning

Q13. What precautions should you take when implementing blending?

Sign in to bookmark

Ensemble Learning

Q14. Can you explain the difference between bagging, boosting, and blending?

Sign in to bookmark

Ensemble Learning

Q15. When should you consider using blending in a machine learning project?

Sign in to bookmark

Ensemble Learning

Q16. What challenges can arise when implementing blending in practice?

Sign in to bookmark

Ensemble Learning

Q17. An argument erupts between two senior data-scientists regarding the choice of an approach for training of a very small medical corpus. One suggest that bagging is superior while the other suggests stacking. Which technique, bagging or stacking, in your opinion is superior? Explain in detail.

Sign in to bookmark
  1. Stacking since each classier is trained on all of the available data.
  2. Bagging since we can combine as many classifiers as we want by training each on a different sub-set of the training corpus.

Ensemble Learning

Q18. Below Fig depicts a part of a specific ensembling approach applied to the models $x1, x2...xk$.

Sign in to bookmark

In your opinion, which approach is being utilized?

Ensemble Learning

Q19. 1. **True or false**: Training an ensemble of a single monolithic architecture results in lower model diversity and possibly decreased model prediction accuracy.

Sign in to bookmark
  1. True or false: The generalization accuracy of an ensemble increases with the number of well-trained models it consists of.
  2. True or false: Bootstrap aggregation (or bagging), refers to a process wherein a CNN ensemble is being trained using a random subset of the training corpus.
  3. True or false: Bagging assumes that if the single predictor shave independent errors, then a majority vote of their outputs should be better than the individual predictions.

Ensemble Learning

Q20. 1. In a transfer-learning experiment conducted by a researcher, a number of ImageNet-pretrained CNN classifiers, selected from Table 6.1 are trained on five different folds drawn from the same corpus. Their outputs are fused together producing a composite machine. Ensembles of these convolutional neural networks architectures have been extensively studies an evaluated in various ensembling approaches. Is it likely that the composite machine will produce a prediction with higher accuracy than that of any individual classifier? Explain why.

Sign in to bookmark

Ensemble Learning

Q21. In committee machines, mark all the combiners that do not make direct use of the input:

Sign in to bookmark
  1. A mixture of experts
  2. Bagging
  3. Ensemble averaging
  4. Boosting

Ensemble Learning

Q22. Refer to the papers: <a href='https://arxiv.org/pdf/1506.02142.pdf'>Dropout as a Bayesian Approximation</a> and <a href='https://arxiv.org/pdf/1906.02530.pdf'>Can You TrustYour Model’s Uncertainty?</a> and answer the following question:

Sign in to bookmark
  1. Do deep ensembles achieve a better performance on out-of-distribution uncertainty benchmarks compared with Monte-Carlo (MC)-dropout?

Ensemble Learning

Q23. **True or False**: Considering a binary classification problem $(y = 0\ or \ y = 1)$, ensemble averaging, wherein the outputs of individual models are linearly combined to produce a fused output is a form of a static committee machine.

Sign in to bookmark

Ensemble Learning

Q24. **True or false**: When using a single model, the risk of overfitting the data increases when

Sign in to bookmark

the number of adjustable parameters is large compared to cardinality (i.e., size of the set) of the training corpus.

Ensemble Learning

Q25. **True or false**: If we have a committee of $K$ trained models and the errors are uncorrelated, then by averaging them the average error of a model is reduced by a factor of $K$.

Sign in to bookmark

Ensemble Learning

Q26. 1. Define ensemble learning in the context of machine learning.

Sign in to bookmark
  1. Provide examples of ensemble methods in classical machine-learning.
  2. True or false: Ensemble methods usually have stronger generalization ability.
  3. Complete the sentence: Bagging is variance/bias reduction scheme while boosting reduced variance/bias.

Ensemble Learning

Q27. Your colleague, a well-known expert in ensembling methods, writes the following pseudo-code in Python shown in Fig. 6.7 for the training of a neural network. This runs inside a standard loop in each training and validation step.

Sign in to bookmark
  import torchvision.models as models ...
  models = ['resnext']
  for m in models: 
      train ...
      compute VAL loss ... 
      amend LR ...
      if (val_acc > 90.0):
          saveModel()
  1. What type of ensembling can be used with this approach? Explain in detail.
  2. What is the main advantage of snapshot ensembling? What are the disadvantages, if any?

Ensemble Learning

Q28. Assume further that your colleague amends the code as follows.

Sign in to bookmark
  import torchvision.models as models
  import random
  import np
  ...
  models = ['resnext']
  for m in models:
      train ...
      compute loss ...
      amend LR ...
      manualSeed= draw a new random number
      random.seed(manualSeed)
      np.random.seed(manualSeed)
      torch.manual_seed(manualSeed)
      if (val_acc > 90.0):
          saveModel()

Explain in detail what would be the possible effects of adding lines 10-13.

Ensemble Learning

Q29. 1. Assume your colleague, a veteran in DL and an expert in ensembling methods writes the following Pseudo code shown in Fig. 6.9 for the training of several neural networks. This code snippet is executed inside a standard loop in each and every training/validation epoch.

Sign in to bookmark
    import torchvision.models as models 
    ...
    models = ['resnext','vgg','dense']
    for m in models: 
        train ...
        compute loss/acc 
        ... 
        if (val_acc > 90.0):
            saveModel()
    ```
    What type of ensembling is being utilized in this approach? Explain in detail.
2. Name one method by which NN models may be combined to yield a single prediction.

Ensemble Learning

Q30. 1. Referring to Below fig. which depicts a specific learning rate schedule, describe the basic notion behind its mechanism.

Sign in to bookmark

Ensemble Learning

Q31. Two popular algorithms for winning Kaggle solutions are Light GBM and XGBoost. They are both gradient boosting algorithms.

Sign in to bookmark
  1. What is gradient boosting?
  2. What problems is gradient boosting good for?