Quiz Space

Machine Learning Practice · End Term · 1 Sept 2024 · May 2024 term · Set QDF3

Question 19: The following code produces an output of 0.9125. How is …

Question 19

+4 marksOne correct option

The following code produces an output of 0.9125. How is the output expected to change if we increase the max_depth value?:

python
from sklearn.datasets import load_wine
from sklearn.tree import DecisionTreeClassifier
from sklearn.model_selection import train_test_split
X,y = load_wine(as_frame = True, return_X_y = True)
X_train,X_test,y_train,y_test = train_test_split(X,
y,
test_size = 0.10,
random_state = 12)
clf = DecisionTreeClassifier(max_depth = 2,
min_samples_split = 2,
min_samples_leaf=3,
random_state = 81)
clf.fit(X_train, y_train)
print(clf.score(X_train, y_train))
  1. A

    Output score is likely to increase.

  2. B

    Output score is likely to decrease.

  3. C

    Output score may increase or decrease.

  4. D

    Output score will remain the same.

Show answer

Correct answer

  • A

    Output score is likely to increase.

Question 19 of 37 in the IIT Madras BS Machine Learning Practice (MLP) End Term paper sat on 1 Sept 2024, in the May 2024 term (IIT M FOUNDATION DIPLOMA AN EXAM QDF3 01 Sep 2024). It carries 4 marks.

This question was also asked in

More questions from this paper

  1. Q1Consider the following common data and answer the subquestion: Consider the following code snippet: Which of the follow…
  2. Q2Consider the following common data and answer the subquestion: What is the output of the following code snippet: Enter …
  3. Q3Consider the following common data and answer the subquestion: What is the output of the following code snippet: Enter …
  4. Q4Consider the following common data and answer the subquestion: What is the output of the following code snippet: Enter …
  5. Q5Consider the following common data and answer the subquestion: What is the output of the following code snippet: Choose…
  6. Q6To load datasets from openml.org, which method will be appropriate?
  7. Q7In which of the option given below data preprocessing is required?
  8. Q8Consider the following code block: Which of the following may be the correct output of the above code?
  9. Q9Which of the following scikit-learn classes is best suited for examining how the number of samples impacts training and…
  10. Q10Consider following two statements:\ Statement 1: The GaussianNB classifier can incrementally learn using partial_fit.\ …
  11. Q11Given below code to load a huge file name as filename.csv and this file is not loading at once in the system which para…
  12. Q12Which of the following is true for a hard margin SVM algorithm ?
  13. Q13What could be the output for below code
  14. Q14Decision Trees are prone to:
  15. Q15Following is the code to tune the degree parameter of a polynomial regression model. What should the blank space contai…
  16. Q16Consider the following code block: What are the most suitable values to be filled in the two blank spaces (in that orde…
  17. Q17Consider following code: Which of the following is a suitable choice for warm_start if you wanted to plot learning curv…
  18. Q18Figure question
  19. Q20Consider the following code. How many different combinations of DecisionTreeClassifier models will be trained internall…
  20. Q21Consider the following code for a VotingClassifier. What is the effect of setting voting='soft'?
  21. Q22Figure question
  22. Q23Figure question
  23. Q24Consider the following code: The sizes of X and y are (150, 4) and (150,) respectively. Which of the following would be…
  24. Q25Consider the following code block: Which of the following may be appropriate to be filled in the blank space?
  25. Q26Which of the following is a hyper parameter?
  26. Q27Which of the following models are inherently multiclass models?
  27. Q28Which of the following class(es) is/are used to instantiate a neural network in Sklearn.
  28. Q29Which of the following is correct?
  29. Q30Which of the following processes can be done if we have a dataset with imbalanced target class distribution?
  30. Q31Which of the following is true about Naive Bayes algorithm ?
  31. Q32Which of the following is/are correct regarding RadiusNeighborsClassifier
  32. Q33Figure question
  33. Q34Figure question
  34. Q35Consider the following block of code: In which of the following scenarios, the split will can happen at node N?
  35. Q36Figure question
  36. Q37Figure question