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
Identify the errors in the following code:

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

What will be the shape of the transformed matrix X?
What will be the shape of the transformed matrix X?
Solution
We use classification report to evaluate our classification model:

Which of the following metrics are included in the classification report?
Which of the following metrics are included in the classification report?
Solution
Consider the following cases for splitting train and test data for some real world dataset.

Which of the following hold true?
Which of the following hold true?
Solution
What is the output of the following code? (Round to 2 decimals)

Solution
Solution
You are given the following DataFrame:

You want to perform the following imputation strategy:
- Age → Replace missing values with the mean Age of each Department
- Salary → Replace missing values with the median Salary of the entire column
- Department → No imputation
Which of the following code snippets correctly performs the above imputation?
You want to perform the following imputation strategy:
- Age → Replace missing values with the mean Age of each Department
- Salary → Replace missing values with the median Salary of the entire column
- Department → No imputation
Which of the following code snippets correctly performs the above imputation?
Solution
You are given the following dataset and model:

What is the value of prediction after running this code?
What is the value of prediction after running this code?
Solution
Select the correct statements from the following regarding GridSearchCV:
Solution
For the given above code calculate the sparcity (% of zeros) in one_hot.
Enter your answer in percentage rounded to 2 decimals.
Solution
You are using make_blobs to generate synthetic data for clustering:

What will the output of the above clustering code?
What will the output of the above clustering code?
Solution
What does metric in the following code measure?

Solution
You are training a RandomForestRegressor on a dataset with 20 features and 10,000 samples.
Consider the following code:

Which of the following statements is TRUE about how this Random Forest model will behave?
Consider the following code:
Which of the following statements is TRUE about how this Random Forest model will behave?
Solution
What will be the output of the following code ? (Round to two decimals)

Solution
If pval = 0.03 for the following code, which of the option is correct at the 5% level?

Solution
You are given the following four implementations of cosine similarity in NumPy. Which function correctly computes cosine similarity?
Solution
Which of the following can be used to evaluate the outputs of the K-Means algorithm?
Solution
Select the correctly matched pairs of sklearn functions with the use of fit, fit_transform and transform.
Solution
What is the output of the following code?

Solution
Following is the code to tune the degree parameter of a polynomial regression model.

What should the blank space contain?
What should the blank space contain?
Solution
Which of the following is a hyper parameter?
Solution
You are using statsmodels to forecast a time series. Which of the following represents the correct sequence of code to define an ARIMA model, train it, and view the results?
Solution
For a LinearRegression model with equation

assume that the noise term
. The model parameters satisfy the constraint

A LinearRegression model is trained without intercept as shown below:

What is the value of
? Enter your answer rounded to three decimal places
assume that the noise term
A LinearRegression model is trained without intercept as shown below:
What is the value of
Solution
Which of the following is required for user-based collaborative filtering?
Solution
Compute cosine similarity for the two items which have feature vectors as given below(rounded to 2 decimals).

Solution
Consider the following code snippet:

If the shape of X is
, what will be the number of features in X_transformed?
If the shape of X is
Solution
Given the following code using BaggingClassifier with KNeighborsClassifier as the base estimator:

Which of the following statements is correct?
Which of the following statements is correct?
Solution
Which of the following algorithms may get impacted by feature scaling?
Solution
Given below a y_train list which consists of coffee order's preference by the customers in a cafe.

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

MultiLabelBinarizer from sklearn library has been used to convert the y_train into numbers, so which of the following option matches with the output of the following code ?
Solution
What could be the output for below code

Solution
Shape
Thickness [ / ]
3
All colors