Quiz Space

MLP End Term: 3 September 2023, Set QPD1-S2 (May 2023 term)

Question 1

+2 marksNumerical answer

Question 2

+2 marksOne correct option

Given below a y_train list which consists of pizza’s ordered by the customers in a shop.

python
y_train = [['regular', 'veg'],
['medium', 'veg'],
['regular', 'non-veg'],
['medium', 'non-veg']]

MultiLabelBinarizer from sklearn library has been used to convert the y_train into numbers, so which of the following option matches with the output using the following code ?

python
from sklearn.preprocessing import MultiLabelBinarizer
mlb = MultiLabelBinarizer(classes=['regular','medium', 'veg', 'non-veg'])
print(mlb.fit_transform(y_train))
  1. A
  2. B
  3. C
  4. D

Question 3

+2 marksOne correct option

You’re building a machine learning pipeline to preprocess data and train a model on a classification task. You decide to use a pipeline that includes data preprocessing and a support vector machine (SVM) classifier.

The following code snippet demonstrates the pipeline creation and usage:

python
from sklearn.pipeline import Pipeline
from sklearn.svm import SVC
from sklearn.preprocessing import StandardScaler
import numpy as np
# Simulated data (features: X, target: y)
X = np.array([[2, 3], [5, 7], [8, 10]])
y = np.array([0, 1, 0])
# Create a pipeline with StandardScaler and SVM classifier
pipeline = Pipeline([
('scaler', StandardScaler()),
('svm', SVC())])
# Fit the pipeline on training data
pipeline.fit(X, y)
# Make predictions using the trained pipeline
predictions = pipeline.predict(X)

What is the purpose of using the pipeline in this code snippet?

  1. A

    The pipeline combines multiple models for better model performance.

  2. B

    The pipeline allows for simultaneous training of the scaler and classifier.

  3. C

    The pipeline simplifies the code by encapsulating preprocessing and modeling steps.

  4. D

    The pipeline ensures that only linear SVM can be used for this classification task.

31 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 3 Sept 2023 Set QPD1-S2 paper

The IIT Madras BS Machine Learning Practice (MLP) End Term paper sat on 3 Sept 2023, in the May 2023 term, set QPD1-S2: 34 questions for 100 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 3 Sept 2023 Set QPD1-S2 at a glance
TermMay 2023 term
SubjectMachine Learning Practice
Course codeBSCS2008
Questions34
Marks100
Duration180 min
Numerical4
MCQ24
MSQ6
Official paperIIT M DIPLOMA ET1 EXAM QPD1 S2 03 Sep
Negative markingNo negative marking.
Updated

Other sets that day

Same End Term, other subjects

More MLP