Interview questions
Frequently asked questions with concise model answers. Try answering aloud before expanding.
Explain the bias–variance trade-off. Medium
Bias: error from overly simple assumptions (underfitting). Variance: sensitivity to training data (overfitting). Increasing model complexity lowers bias but raises variance; we aim for the sweet spot via validation, regularisation and more data.
What is cross-validation? Easy
Splitting data into k folds, training on k−1 and validating on the remaining fold, rotating k times. It gives a more reliable performance estimate than a single split.
Precision vs recall? Easy
Precision = TP / (TP + FP): of predicted positives, how many are correct. Recall = TP / (TP + FN): of actual positives, how many we found. F1 is their harmonic mean.
How does a random forest work? Medium
It trains many decision trees on bootstrapped samples with random feature subsets, then averages (regression) or votes (classification). This reduces variance compared to a single tree.