Session Ready
Exercise

Predicting mushroom edibility

Now that you have explored the data, it's time to build a first model to predict mushroom edibility.

The dataset is available to you as mushrooms. As both the features and the target are categorical, these have been transformed into "dummy" binary variables for you.

Let's begin with Naive Bayes (using scikit-learn's GaussianNB) and see how this algorithm performs on this problem.

Instructions
100 XP
  • Instantiate a GaussianNB classifier called clf_nb.
  • Fit clf_nb to the training data X_train and y_train.
  • Evaluate the performance on the test set using the accuracy score.