Quiz Space

Machine Learning Practice · Quiz 1 · 27 Oct 2024 · September 2024 term

Question 12: Which of the following could be a correct output from th…

Question 12

+2 marksOne or more correct options

Which of the following could be a correct output from the following code?

python
import numpy as np
from sklearn.model_selection import StratifiedKFold
X = np.random.rand(8, 2)
y = np.array([0, 0, 0, 1, 1, 1, 1, 0])
skf = StratifiedKFold(n_splits=2)
for train_index, test_index in skf.split(X, y):
print("TRAIN:", train_index, "TEST:", test_index)

Select all that apply.

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

Correct answers

  • A
  • D

Question 12 of 22 in the IIT Madras BS Machine Learning Practice (MLP) Quiz 1 paper sat on 27 Oct 2024, in the September 2024 term (IIT M DIPLOMA AN EXAM QDD2 27 Oct 2024). It carries 2 marks.

More questions from this paper

  1. Q1| | FlightID | Airline | FlightNumber | Origin | Destination | DelayMinutes | DelayReason | Cancelled | Diverted | Airc…
  2. Q2| | FlightID | Airline | FlightNumber | Origin | Destination | DelayMinutes | DelayReason | Cancelled | Diverted | Airc…
  3. Q3| | FlightID | Airline | FlightNumber | Origin | Destination | DelayMinutes | DelayReason | Cancelled | Diverted | Airc…
  4. Q4| | FlightID | Airline | FlightNumber | Origin | Destination | DelayMinutes | DelayReason | Cancelled | Diverted | Airc…
  5. Q5| | FlightID | Airline | FlightNumber | Origin | Destination | DelayMinutes | DelayReason | Cancelled | Diverted | Airc…
  6. Q6Consider the following dataset and transformer pipeline: Based on the above data, answer the given subquestions.
  7. Q7Consider the following dataset and transformer pipeline: Based on the above data, answer the given subquestions.
  8. Q8Which of the following preprocessing techniques helps in handling categorical features in a dataset?
  9. Q9Which of the following imputation strategies can be used for handling missing values?
  10. Q10Which of the following is correct about cross-validation in machine learning?
  11. Q11Which of the following are valid loss functions for SGDClassifier?
  12. Q13Consider the following data and code: Which of the following pairs of data points have the second largest Manhattan dis…
  13. Q14Consider the following data and snippet: Which of the following correctly represents the value of transformed_data[2,0]…
  14. Q15Consider the following code where a ‘Pipeline’ is used for feature scaling, polynomial feature transformation, and appl…
  15. Q16You are working on a machine learning project and have received a dataset containing numeric and categorical features. …
  16. Q17Consider the following code snippet: How many components does the PCA reduce the data to, after transformation?
  17. Q18Consider the below code: What will be the output of the code snippet given above?
  18. Q19Figure question
  19. Q20Figure question
  20. Q21Figure question
  21. Q22Figure question