Skip to content

Machine Learning Quiz

Machine Learning Quiz1 of 10

Machine Learning

What is the Matthews correlation coefficient?

datasciencetrivia.com

Created by santiviquez

About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.

About the machine learning quiz

Ten questions on the machine learning ideas interviews keep coming back to: the bias-variance tradeoff, regularization, picking a metric, cross-validation, ensembles and feature encoding. Answer in your head, reveal the answer, and be honest about whether you got it.

10 questions per run, drawn from 69. Free, no sign-up. Every question comes from the machine learning interview questions.

Questions and answers

The 10 questions this quiz opens with. Play first, then open one to check your answer.

  1. What is the Matthews correlation coefficient? Show answer

    A single score for a binary classifier that uses all four cells of the confusion matrix: MCC = (TP·TN − FP·FN) / √((TP+FP)(TP+FN)(TN+FP)(TN+FN)). It runs from −1 to 1, with 0 for random guessing, and stays honest on imbalanced data. Longer answer

  2. What is downsampling in the context of class-imbalanced dataset? Show answer

    Training on a disproportionately low percentage of over-represented class examples in order to improve model training on under-represented classes. Longer answer

  3. What is variance in the context of machine learning? Show answer

    Variance is the error that comes from a model's sensitivity to small fluctuations in the training set: trained on a different sample, a high-variance model makes noticeably different predictions. High variance can cause an algorithm to model the random noise in the training data, which is overfitting. Longer answer

  4. Mean Squared Error, Root Mean Squared Error, Mean Absolute Error, R-squared are metrics for evaluation which type of models? Show answer

    Regression models. Longer answer

  5. What is WAPE? Show answer

    Weighted absolute percentage error: total absolute error divided by total actual volume, Σ|actual − forecast| / Σ|actual|. Unlike MAPE it doesn't blow up on small or zero actuals, because each error counts in proportion to volume. Longer answer

  6. What is the difference between sensitivity and specificity? Show answer

    Sensitivity is the share of actual positives a test catches, TP / (TP + FN), the same as recall. Specificity is the share of actual negatives it correctly clears, TN / (TN + FP). Moving the decision threshold trades one for the other. Longer answer

  7. What is unsupervised learning? Show answer

    Machine learning on data without labels: the algorithm finds structure in the inputs alone, through clustering, dimensionality reduction or anomaly detection. Examples include k-means, PCA, DBSCAN, hierarchical clustering, Gaussian mixture models and isolation forest. Longer answer

  8. Which regularization would you use if your model is underfitting? Show answer

    None: regularization fights overfitting, and adding it to an underfitting model makes things worse. If the model is already regularized, weaken or remove it, and add capacity or better features. Longer answer

  9. What is one hot encoding? Show answer

    Encoding a categorical feature as one binary column per category: each row gets a 1 in the column for its own category and 0 in all the others, so every encoded vector is sparse with exactly one 1. Longer answer

  10. Creating a model that matches the training data so closely that the model fails to make correct predictions on new data. Show answer

    Overfitting: the model has memorised noise particular to the training set, so training error keeps falling while validation error turns back up. The fixes matter as much as the name: more data, regularization, early stopping, a simpler model, and cross-validation to detect it. Longer answer

More quizzes