Quiz Space

Machine Learning Practice · End Term · 21 Dec 2025 · September 2025 term

Question 4: You are using a ColumnTransformer to preprocess a dataset…

Question 4

+1 markOne correct option

You are using a ColumnTransformer to preprocess a dataset before training a model:

What will be the shape of the transformed matrix X?

You are using a ColumnTransformer to preprocess a dataset before training a model:
  1. A

    (3,2)

  2. B

    (3,3)

  3. C

    (3,4)

  4. D

    (4,3)

Show answer

Correct answer

  • B

    (3,3)

Question 4 of 60 in the IIT Madras BS Machine Learning Practice (MLP) End Term paper sat on 21 Dec 2025, in the September 2025 term (Machine Learning Practice 18 Dec 25). It carries 1 mark.

More questions from this paper

  1. Q1The adfuller() function in statsmodels is used to test:
  2. Q2Identify the errors in the following code:
  3. Q3What will typically happen if series_with_nans contains NaNs (null values) ?
  4. Q5A newly launched movie has no ratings, but metadata such as genre, cast, and director is available. Which algorithm can…
  5. Q6We use classification report to evaluate our classification model: Which of the following metrics are included in the c…
  6. Q7Performing singular value decomposition on a user-item matrix aims to:
  7. Q8Consider the following cases for splitting train and test data for some real world dataset. Which of the following hold…
  8. Q9Which of the following can be used to evaluate the outputs of the KNNClassifier?
  9. Q10What is the output of the following code? (Round to 2 decimals)
  10. Q11What is the output of the following standard scaler transformation?
  11. Q12Figure question
  12. Q13What is the value of recall score computed in the following code? (Enter upto 2 decimals)
  13. Q14You are given the following DataFrame: You want to perform the following imputation strategy: • Age → Replace missing v…
  14. Q15Which of the following algorithms don't get impacted by feature scaling?
  15. Q16You are given the following dataset and model: What is the value of prediction after running this code?
  16. Q17Consider the following data preprocessing code. What are the number of zero(s) in the transformed labels vector after a…
  17. Q18Select the correct statements from the following regarding GridSearchCV:
  18. Q19What does metric in the following code measure?
  19. Q20For the given above code calculate the sparcity (% of zeros) in one_hot. Enter your answer in percentage rounded to 2 d…
  20. Q21Compute cosine similarity for the two items which have feature vectors as given below (rounded to 2 decimals).
  21. Q22You are using make_blobs to generate synthetic data for clustering: What will the output of the above clustering code?
  22. Q23Identify the datatypes of the two datasets given below: (Assume all library imports are correctly done)
  23. Q24What does metric in the following code measure?
  24. Q25Which of the following statements about Hierarchical Agglomerative Clustering is TRUE?
  25. Q26You are training a RandomForestRegressor on a dataset with 20 features and 10,000 samples. Consider the following code:…
  26. Q27You are using a ColumnTransformer to preprocess a dataset before training a model: What will be the shape of the transf…
  27. Q28What will be the output of the following code ? (Round to two decimals)
  28. Q29Figure question
  29. Q30If pval = 0.03 for the following code, which of the option is correct at the 5% level?
  30. Q31You are given the following dataset and model: What is the value of prediction after running this code?
  31. Q32You are given the following four implementations of cosine similarity in NumPy. Which function correctly computes cosin…
  32. Q33For the RandomForestClassifier select the correct pair(s) of parameter(s) and their explanation(s).
  33. Q34Which of the following can be used to evaluate the outputs of the K-Means algorithm?
  34. Q35What is the output of the following code?
  35. Q36Select the correctly matched pairs of sklearn functions with the use of fit, fit_transform and transform.
  36. Q37Consider the following code snippet. Assume that all required libraries have been imported correctly. A practitioner ob…
  37. Q38What is the output of the following code?
  38. Q39Consider the following cases for splitting train and test data for some real world dataset. Which of the following hold…
  39. Q40Following is the code to tune the degree parameter of a polynomial regression model. What should the blank space contai…
  40. Q41You are performing hyperparameter tuning using GridSearchCV for a machine learning model. The following parameter grid …
  41. Q42Which of the following is a hyper parameter?
  42. Q43You are using make_blobs to generate synthetic data for clustering: What will the output of the above clustering show?
  43. Q44You are using statsmodels to forecast a time series. Which of the following represents the correct sequence of code to …
  44. Q45What does the following pandas code do ?
  45. Q46For a LinearRegression model with equation assume that the noise term . The model parameters satisfy the constraint A L…
  46. Q47What does the parameter hidden_layer_sizes=(50, 30) represent in both MLPClassifier and MLPRegressor?
  47. Q48Which of the following is required for user-based collaborative filtering?
  48. Q49What is the role of the alpha=1.0 parameter in the given sklearn code to build a regression model?
  49. Q50Compute cosine similarity for the two items which have feature vectors as given below(rounded to 2 decimals).
  50. Q51What is the output of the following code?
  51. Q52Consider the following code snippet: If the shape of X is , what will be the number of features in X_transformed?
  52. Q53Which of the following is a hyper parameter?
  53. Q54Given the following code using BaggingClassifier with KNeighborsClassifier as the base estimator: Which of the followin…
  54. Q55Consider the following code snippet that trains a Decision Tree classifier using scikit-learn: A node in the trained de…
  55. Q56Which of the following algorithms may get impacted by feature scaling?
  56. Q57Consider the following ensemble model built using VotingClassifier with voting='soft': How is the final prediction for …
  57. Q58Given below a y_train list which consists of coffee order's preference by the customers in a cafe. MultiLabelBinarizer …
  58. Q59You are given a dataset where each row represents a customer using two numerical features. You apply K-means clustering…
  59. Q60What could be the output for below code