Interview Q&A / Machine Learning
Machine Learning interview questions
Supervised vs unsupervised learning, overfitting, metrics and the classic models, explained simply.
Prefer rapid revision? Practise Machine Learning short interview answers →
- How does a decision tree work, and why does a random forest usually perform better?
A decision tree splits data with a series of yes/no questions, choosing each split to make the groups as pure as possible. A single deep tree overfits easily. A random forest trains many trees on random samples of rows and features and averages their votes, which reduces variance and usually improves accuracy.
IntermediateIn-depth4 min read - Why do we split data into train, validation and test sets, and what is k-fold cross-validation?
The training set teaches the model, the validation set is used to choose settings, and the test set is kept untouched for a final, honest score. K-fold cross-validation splits data into k parts and trains k times, each time testing on a different part, giving a more reliable estimate when data is limited.
IntermediateIn-depth4 min read