Supervised models practice problems

18 problems · 0 solved

Supervised learning means learning from labelled examples to predict labels for new data. Before deep learning, a family of classic models handled most of this work, and they still win on many tabular problems. A decision tree, for example, works like a game of twenty questions, asking simple yes or no questions until it reaches an answer. These problems ask you to build these models from scratch. You will classify by majority vote of nearest neighbours and with distance weighting, classify by the nearest centroid, run an epoch of the perceptron rule, compute information gain, find the best tree split with Gini impurity, grow a depth-limited regression tree, run a round of gradient boosting for squared error, boost decision stumps with AdaBoost, predict with Gaussian Naive Bayes, and train a linear SVM with hinge loss subgradient descent. Start with the Easy problems on k nearest neighbours, centroids and the perceptron. Then do tree splits, gradient boosting and the SVM, and finish with full trees, AdaBoost and Naive Bayes. Fintech and analytics teams use tree models daily, and these algorithms are standard questions in data science interviews.

Easy 5

Medium 10

Hard 3

Related topics

All practice problems