60 questions pulled from past papers whose wording matches this week's topics, newest first, duplicates removed. Pick your answers, then press Check answers. Figures and answer keys are the originals.
A hospital develops a machine learning model to identify patients who may have a rare but life-threatening disease. Only about 1% of patients actually have the disease. Every patient predicted as positive is referred for an inexpensive follow-up blood test. However, missing an actual patient with the disease could delay treatment and have severe consequences. Which evaluation metric should be given the highest priority while selecting the model?
A binary classification model was evaluated on a test set with 500 samples. The model correctly identified 90 positive samples and 360 negative samples. Out of all the samples predicted as positive, 120 were predicted as positive. There were 100 actual positive samples in the dataset. Compute the F1-score of the model. (Round to 2 decimals)
Consider the following assertion and reason. Select the correct option. Assertion (A): Increasing the number of estimators in AdaBoost can sometimes reduce the test accuracy, even though the training error continues to decrease. Reason (R): In AdaBoost, after each iteration, the weights of correctly classified training samples are increased so that future weak learners focus more on these correct samples. Choose the correct option:
Both A and R are true, and R is the correct explanation of A.
Both A and R are true, but R is not the correct explanation of A.
An email service develops a machine learning model to automatically identify phishing emails. Any email predicted as phishing is immediately moved to the user's spam folder without notification. A legitimate email incorrectly marked as phishing could cause users to miss important messages, while an actual phishing email that is not detected can still be reported manually by the user. The company wants to minimize the number of legitimate emails incorrectly classified as phishing. Which evaluation metric should be given the highest priority while selecting the model?
In the following question, an Assertion (A) is followed by a Reason (R). Choose the correct option from the choices given below: Assertion (A): In classification problems, precision should always be maximized over recall Reason (R): Recall is independent of false negatives
Both A and R are true, and R is the correct explanation of A
Both A and R are true, but R is not the correct explanation of A
Consider the following code snippet for a multi-class classification problem with three classes: 0, 1, and 2. The ground-truth labels are stored in , and the predicted labels are stored in .
What is the precision score for class 1?
Consider the given 2 different lasso regression models trained on the same dataset:
Statements: 1. The coefficients of lasso2 are more likely to be smaller in magnitude than those of lasso1. 2. lasso1 may have fewer zero coefficients than lasso2. 3. The predictions of lasso1 on the training data will exactly match y. 4. Increasing alpha always increases model accuracy on unseen data. Which of the given statements are correct?
A medical diagnosis model is used to detect a rare disease that occurs in 0.5% of the population. A model is trained on this data, which of the following evaluation metrics are suitable for measuring effectiveness of this model:
Use the confusion matrix given below. What is the recall score for the label (class) 1 ?
Use the confusion matrix given below. What is the recall score for the label (class) 1 ?
Based on the above data, answer the given subquestions.
Consider the following assertion & reason and select the correct option:
Assertion: This is a good model as we see a very high accuracy of 96% Reason: In the case of imbalanced datasets, accuracy might not be the best metric for evaluating a model
Both the assertion and reason are correct, and the reason is a correctexplanation of the assertion
Both the assertion and reason are correct, but the reason is not a correctexplanation of the assertion.
The assertion is correct, but the reason is incorrect.
The assertion is incorrect, but the reason is correct.
Based on the above data, answer the given subquestions.
Consider the following and select the corrrect option:
Assertion: This is a good model as we see a very high accuracy of 97% Reason: In the case of imbalanced datasets, accuracy might not be the best metric for evaluating a model
Both the assertion and reason are correct, and the reason is a correctexplanation of the assertion
Both the assertion and reason are correct, but the reason is not a correctexplanation of the assertion.
The assertion is correct, but the reason is incorrect.
The assertion is incorrect, but the reason is correct.
Consider a binary classification dataset with labeled as 98% negative samples and 2% positive samples. A model is trained on this data, which of the following evaluation metrics are suitable for measuring effectiveness of this model:
After training a multi-class classifier, you obtain the following confusion matrix. What will be the weighted average of the recall score for each class?
After training a multi-class classifier, you obtain the following confusion matrix. What will be the weighted average of the recall score for each class?
Speeds up the process of finding neighbors on unscaled data.
k-nearest neighbors relies on computing distances. Normalizing featuresensures that each feature contributes approximately equally to the distance computation.
Scaling the data significantly improves the accuracy of k-nearest neighbormodels.
It doesn’t matter. K-nearest neighbors works equally well with or withoutnormalizing the dataset.
You’re working on a binary classification problem where the dataset is relatively small, and you suspect that a linear decision boundary will work well due to distinct class separation. Additionally, you want to perform logistic regression with L1 regularization for improved feature selection. Which solver is most appropriate for this scenario?
You’re working on a binary classification task using the ‘MLPClassifier’ to predict whether a customer will make a purchase based on their browsing behavior.You’re concerned about overfitting due to the complexity of the model. You decide to increase the ‘alpha’ parameter to control overfitting. The following code snippet shows the application of ‘MLPClassifier’:
You’re working on a binary classification task using the ‘MLPClassifier’ to predict whether a customer will make a purchase based on their browsing behavior.You’re concerned about overfitting due to the complexity of the model. You decide to increase the ‘alpha’ parameter to control overfitting. The following code snippet shows the application of ‘MLPClassifier’:
Increasing the model’s complexity to fit the training data more closely.
Adding a stronger regularization term to the loss function, discouragingcomplex models.
Making the model more sensitive to outliers and noise in the data.
Adjusting the learning rate to control convergence speed.
Using the confusion matrix given below. What is the precision score for the label (class) 1 ?
Using the confusion matrix given below. What is the precision score for the label (class) 1 ?
Consider the following statements about SGDClassifier: 1. It can be used to train a model on large dataset that doesn’t fit in main memory 2. It can emulate a KNN model 3. It can emulate a decision tree model 4. It can emulate a perceptron Choose the correction option(s)
Which of the following options represents all the correct precision, Recall, and accuracy values for the confusion matrix shown in Figure 1? [Note: All 3 values should be correct in the same option]
Which of the following options represents all the correct precision, Recall, and accuracy values for the confusion matrix shown in Figure 1? [Note: All 3 values should be correct in the same option]
Mention whether the following statements are TRUE or FALSE . Statement 1 : ‘In order to extend ROC curve and ROC area to multi-label classification, it is necessary to binarize the output.‘ Statement 2: In SGDClassifier, setting warm_start=True does not retain the weight values of the model after max_iter and hence does not produce different results for each execution.‘
Statement 1 is correct but statement 2 is incorrect.
Statement 1 is incorrect but statement 2 is correct.
You have a binary classification problem to solve with following information: 1. All features are numircal. 2. The dataset has size of 80 GB. 3. The data has to be preprocessed. 4. After data preprocessing, train the model with gradient descent or its variations. Which of the following will perform the above task?
Perform one hot encoding followed by training with LogisticRegression model(sklearn.linear_model).
Perform standard scaling followed by asklearn.neighbors.KNeighborsClassifier model.
Perform min-max scaling followed by a sklearn.tree.DecisionTreeClassifiermodel.
Perform max-absolute scaling followed by asklearn.linear_model.SGDClassifier model.
Consider following statements: 1. Statement 1 : In order to extend ROC curve and ROC area to multi-label classification, it is necessary to binarize the output. 2. Statement 2: In SGDClassifier, setting warm_start=True retains the weight values of the model after max_iter and hence produce different results for each execution. Choose the correct option:
Statement 1 is correct but statement 2 is incorrect.
Statement 1 is incorrect but statement 2 is correct.
Which of the following options represent the recall value for the class 2 in the confusion matrix shown in Figure 1 if y_true = [0, 1, 2, 2, 2], y_pred = [0, 0, 2, 2, 1] ?
Which of the following options represent the recall value for the class 2 in the confusion matrix shown in Figure 1 if y_true = [0, 1, 2, 2, 2], y_pred = [0, 0, 2, 2, 1] ?