1. Học hỏi
  2. /
  3. Khoa Học
  4. /
  5. Introduction to Regression in R

Connected

Bài tập

Measuring logistic model performance

Having the confusion matrix as a table object is OK, but a little hard to program with. By converting this to a yardstick confusion matrix object, you get methods for plotting and extracting performance metrics.

The confusion matrix, outcomes is available as a table object. ggplot2 and yardstick are loaded, and the yardstick.event_first option is set to FALSE.

Hướng dẫn

100 XP
  • Convert outcomes to a yardstick confusion matrix. Assign to confusion.
  • Automatically plot confusion.
  • Get performance metrics from confusion, remembering that the positive response is in the second column.