Exercise

Applying stacking to predict app ratings

In this exercise you'll start building your first Stacking ensemble. The dataset you'll use is the first one we used in Chapter 1. If you recall, the objective is to predict the rating of each app (from 1 to 5). The input features we use are: Reviews, Size, Installs, Type, Price, and Content Rating.

We already did step 1: prepare the dataset. It is available to you as apps. We cleaned the required features and replaced missing values with zeros.

Now, you'll work on step 2: build the first-layer estimators.

Instructions

100 XP
  • Build and fit a decision tree classifier with: min_samples_leaf: 3 and min_samples_split: 9.
  • Build and fit a 5-nearest neighbors classifier using: algorithm: 'ball_tree' (to expedite the processing).
  • Evaluate the performance of each estimator using the accuracy score on the test set.