Quiz Space

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

Question 24: Consider the following code: The sizes of X and y are (1…

Question 24

+2 marksOne or more correct options

Consider the following code:

python
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
X, y = load_iris(return_X_y = True)

The sizes of X and y are (150, 4) and (150,) respectively. Which of the following would be the correct code snippet to split X and y into training and test data such that test data has exactly 30 samples?

Select all that apply.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answers

  • A
  • D

Question 24 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 2 marks.

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. Q19The following code produces an output of 0.9125. How is the output expected to change if we increase the max_depth valu…
  20. Q20Consider the following code. How many different combinations of DecisionTreeClassifier models will be trained internall…
  21. Q21Consider the following code for a VotingClassifier. What is the effect of setting voting='soft'?
  22. Q22Figure question
  23. Q23Figure question
  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