Exercise

A first attempt with mlxtend

It's time to start working with mlxtend! You'll continue using the app ratings dataset. As you have already built a stacked ensemble model using scikit-learn, you have a basis to compare with the model you'll now build with mlxtend.

The dataset is loaded and available to you as apps.

Let's see if mlxtend can build a model as good as or better than the scikit-learn ensemble classifier.

Instructions

100 XP
  • Instantiate a decision tree classifier with min_samples_leaf = 3 and min_samples_split = 9.
  • Instantiate a 5-nearest neighbors classifier using the 'ball_tree' algorithm.
  • Build a StackingClassifier passing: the list of classifiers, the meta classifier, use_probas=True (to use probabilities), and use_features_in_secondary = False (to only use the individual predictions).
  • Evaluate the performance by computing the accuracy score.