Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT"DIPLOMA LEVEL : MACHINE LEARNING PRACTICE (COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
Solution
To load datasets from openml.org, which method will be appropriate?
Solution
Why is data preprocessing necessary?
Solution
Consider the following code block:

Solution
Which of the following sklearn classes will be the most suitable for examining the effect of the number of samples on the training and testing errors?
Solution
Which of the following is not a hyper parameter?
Solution
Consider following two statements:
Statement 1: The multinomial Naive Bayes classifier is suitable for classification with discrete features
Statement 2: Two dependent features impact GaussianNB performance because internally it calculates the conditional probability.
Statement 1: The multinomial Naive Bayes classifier is suitable for classification with discrete features
Statement 2: Two dependent features impact GaussianNB performance because internally it calculates the conditional probability.
Solution
Solution
Which of the following is true for a hard margin SVM algorithm ?
Solution
What will the output for below code

Solution
Which of the following APIs can be used to construct an ML pipeline that has numerical and categorical features both? Choose the most suitable answer.
Solution
Consider the following preprocessing steps:
1. Read the data from a file (named ‘dataset.csv’). It has 4 columns, with following column names ‘city’, ‘title’, ‘expert_rating’ and ‘user_rating’ in this order.
2. Drop rows with missing values.
3. Apply ‘CountVectorizer’ on ‘title’.
4. Apply one hot encoding to ‘city’.
5. Drop the remaining columns.
6. Fit and transform the data and print it.
Which of the following code snippets correctly accomplishes the above task? Assume necessary imports.
1. Read the data from a file (named ‘dataset.csv’). It has 4 columns, with following column names ‘city’, ‘title’, ‘expert_rating’ and ‘user_rating’ in this order.
2. Drop rows with missing values.
3. Apply ‘CountVectorizer’ on ‘title’.
4. Apply one hot encoding to ‘city’.
5. Drop the remaining columns.
6. Fit and transform the data and print it.
Which of the following code snippets correctly accomplishes the above task? Assume necessary imports.
Solution
Consider the following code block:

Solution
What will be the output of the following code?:

Solution
Consider following model:

Solution
If we need quick results during the testing phase, then which classification techniques may not be appropriate?
Solution
Following is the code to tune the degree parameter of a polynomial regression model.
Solution
The following code produces an output of 0.9125. How is the output expected to change if we increase the max_depth value?:

Solution
Consider the following code. How many DecisionTreeClassifier models will be trained internally?

Solution
Consider two classifiers as shown in the following block of code:

Solution
Consider the following code:

Solution
Consider the following code block with respect to some dataset contained in X and y.

Solution
Which of the following models are inherently multiclass models?
Solution
Which of the following is/are correct regarding Radius Neighbors Classifier
Solution
Which options are correct for large datasets that don’t fit into the system’s main memory?
Solution
Which of the following class(es) is/are used to instantiate a neural network in Sklearn.
Solution
Which of the following is correct?
Solution
Which of the following processes should be done if we get an imbalanced dataset? Data is imbalanced when the target class has an uneven distribution of label values.
Solution
Which of the following is true about Naive Bayes algorithm ?
Solution
Solution
Which options are correct for Support Vectors in SVM ?
Solution
Consider the following block of code:

Solution
Suppose we want to choose the best value ofkink−means clustering algorithm using Silhouette Coefficient values. Which of the following are required to compute the coefficient value? Note: Labels (cluster number) of the samples are random. There is no functional relationship between a sample and its label
Solution
Which of the following approach(es) is(are) helpful to find a good value forkink−means clustering algorithm?
Solution
The following line of code create a neural network (assume necessary imports)

Solution
What will be the output of the following code?:

Solution
The plot below shows a distribution of 200 samples with 2 features in Euclidean space. Suppose we use the K-means clustering algorithm to group these data points into individual clusters. Enter the value ofKfor which the inertia (Sum Square Error) will be zero. If you conclude, there is no such value for K, then enter -1.

Solution
Shape
Thickness [ / ]
3
All colors