1. Learn
  2. /
  3. Courses
  4. /
  5. Practicing Statistics Interview Questions in Python

Connected

Exercise

Classification evaluation

Moving forward with evaluation metrics, this time you'll evaluate our logistic regression model from before with the goal of predicting the binary RainTomorrow feature using humidity.

We have gone ahead and imported the model as clf and the same test sets assigned to the X_test and y_test variables. Generate and analyze the confusion matrix and then compute both precision and recall before making a conclusion.

Instructions 1/3

undefined XP
  • 1

    Generate and print out the confusion matrix for your model; identify the Type I and Type II errors.

  • 2

    Compute and print the precision of your model; can you explain why precision is helpful in this context?

  • 3

    Adapt your code to compute and print the recall of your model; what do you conclude?