DecodeAI
← Question Bank

Machine Learning

General Concepts In Machine Learning

Interview questions on General Concepts In Machine Learning.

14 questions

Cross Validation

Q1. Below Fig depicts two different cross-validation approaches. Name them.

Sign in to bookmark

Cross Validation

Q2. 1. What is the purpose of following Python code snippet?

Sign in to bookmark
        skf = StratifiedKFold(y, n_folds=5, random_state=989, shuffle=True)
        ```
2. Explain the benefits of using the K-fold cross validation approach.
3. Explain the benefits of using the Stratified K-fold cross validation approach.
4. State the difference between K-fold cross validation and stratified cross validation.
5. Explain in your own words what is meant by “We adopted a 5-fold cross-validation approach to estimate the testing error of the model”.

Cross Validation

Q3. **True or False:** In a K-fold CV approach, the testing set is completely excluded from the process and only the training and validation sets are involved in this approach.

Sign in to bookmark

Cross Validation

Q4. **True or False:** In a K-fold CV approach, the final test error is:

Sign in to bookmark

CVk=1ki=1kMSEiCV_k = \frac{1}{k}\sum_{i=1}^{k}MSE_i

Cross Validation

Q5. Mark all the correct choices regarding a cross-validation approach:

Sign in to bookmark
  1. A 5-fold cross-validation approach results in 5-different model instances being fitted.
  2. A 5-fold cross-validation approach results in 1 model instance being fitted over and over again 5 times.
  3. A 5-fold cross-validation approach results in 5-different model instances being fitted over and over again 5 times.
  4. Uses K-different data-folds.

Cross Validation

Q6. Mark all the correct choices regarding the approach that should be taken to compute the performance of K-fold cross-validation:

Sign in to bookmark
  1. We compute the cross-validation performance as the arithmetic mean over the K performance estimates from the validation sets.
  2. We compute the cross-validation performance as the best one over the K performance estimates from the validation sets.

Cross Validation

Q7. A data-scientist who is interested in classifying cross sections of histopathology image slices decides to adopt a cross-validation approach he once read about in a book.

Sign in to bookmark

Cross Validation

Q8. 1. **True or false**: The leave-one-out cross-validation (LOOCV) approach is a sub-case of k-fold cross-validation wherein K equals N , the sample size.

Sign in to bookmark
  1. True or false: It is always possible to find an optimal value nn ,K=n K = n in K-fold cross-validation.

Cross Validation

Q9. What is the main difference between RandomizedSearchCV and GridSearchCV?

Sign in to bookmark

Cross Validation

Q10. When would you prefer to use RandomizedSearchCV over GridSearchCV, and vice versa?

Sign in to bookmark

Cross Validation

Q11. What are the advantages of RandomizedSearchCV?

Sign in to bookmark

Cross Validation

Q13. What is cross-validation in the context of hyperparameter tuning?

Sign in to bookmark

Cross Validation

Q14. Can you combine RandomizedSearchCV and GridSearchCV techniques for hyperparameter tuning?

Sign in to bookmark