Quiz Space

MLP End Term: 13 April 2025, Set QDD1 (January 2025 term)

Question 1

+1 markOne correct option

Given the following code snippet that preprocesses a dataset with both continuous and categorical features using sklearn.preprocessing tools, what will be the first row of the X_transformed array after preprocessing?

python
import numpy as np
from sklearn.preprocessing import MinMaxScaler, OneHotEncoder
from sklearn.compose import ColumnTransformer
X = np.array([[2.0, 'apple'],
[5.0, 'banana'],
[1.0, 'apple'],
[4.0, 'cherry']])
preprocessor = ColumnTransformer(
transformers=[('num', MinMaxScaler(), [0]),
('cat', OneHotEncoder(), [1])])
X_transformed = preprocessor.fit_transform(X)
print(X_transformed[0])
  1. A
  2. B
  3. C
  4. D

Question 2

+1 markOne correct option

What will be the output of the following code?

python
import pandas as pd
from sklearn.preprocessing import StandardScaler
data = pd.DataFrame({
'col1': [1, 2, 3, 4, 5],
'col2': [10, 20, 30, 40, 50]
})
ss = StandardScaler()
scaled_data = ss.fit_transform(data)
print(ss.var_)
  1. A
  2. B
  3. C
  4. D

Question 3

+1 markOne correct option

Imagine you are using a Dummy Regressor with strategy=median. Given the following dataset:

S.NoX1X_1X2X_2X3X_3YY
12.34.53.210.5
21.83.24.112.3
32.54.12.911.1
42.03.83.59.8
51.93.63.010.9
62.44.23.311.5

What will be the predicted output for an input X = [2.1,3.9,3.2] ?

  1. A

    10.5

  2. B

    11.0

  3. C

    11.5

  4. D

    12.3

27 more questions in this paper

Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.

More on the MLP End Term 13 Apr 2025 Set QDD1 paper

The IIT Madras BS Machine Learning Practice (MLP) End Term paper sat on 13 Apr 2025, in the January 2025 term, set QDD1: 30 questions for 50 marks in 180 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.

FeatureMLP End Term 13 Apr 2025 Set QDD1 at a glance
TermJanuary 2025 term
SubjectMachine Learning Practice
Course codeBSCS2008
Questions30
Marks50
Duration180 min
MCQ16
Numerical7
MSQ7
Official paperIIT M DIPLOMA AN EXAM QDD3 13 Apr 2025
Negative markingNo negative marking.
Updated

Other sets that day

Same End Term, other subjects

More MLP