Loading

Quipoin Menu

Learn • Practice • Grow

python-for-ai / Evaluating a Model
mcq
Direction: Choose the correct option

Q1.

What does `accuracy_score` measure?
A. Fraction of correct predictions
B. Precision
C. Recall
D. F1 score
Direction: Choose the correct option

Q2.

Which function computes the confusion matrix?
A. classification_report
B. confusion_matrix
C. precision_recall_fscore_support
D. accuracy_score
Direction: Choose the correct option

Q3.

What does precision represent?
A. TP / (TP + FN)
B. (TP+TN)/total
C. 2*(precision*recall)/(precision+recall)
D. TP / (TP + FP)
Direction: Choose the correct option

Q4.

What does recall represent?
A. TP / (TP + FP)
B. TN / (TN+FP)
C. Specificity
D. TP / (TP + FN)
Direction: Choose the correct option

Q5.

Which function returns precision, recall, F1, and support for each class?
A. metrics.classification
B. precision_recall_fscore_support
C. Both A and B
D. classification_report
Direction: Choose the correct option

Q6.

What is the F1 score?
A. Arithmetic mean
B. Geometric mean
C. None
D. Harmonic mean of precision and recall
Direction: Choose the correct option

Q7.

What does `roc_auc_score` compute?
A. Receiver operating characteristic
B. Precision-recall curve
C. None
D. Area under the ROC curve
Direction: Choose the correct option

Q8.

How do you perform k-fold cross-validation?
A. KFold and manual loop
B. cross_val_score(model, X, y, cv=5)
C. Both A and B
D. cross_validate
Direction: Choose the correct option

Q9.

What is the purpose of `mean_squared_error`?
A. Evaluate regression models
B. None
C. Evaluate classification models
D. Both
Direction: Choose the correct option

Q10.

Which metric is robust to outliers in regression?
A. Mean squared error (MSE)
B. Both A and B
C. Mean absolute error (MAE)
D. R-squared