Week 2 Assignment 2B Approach

Author

Supriya P.

Introduction (Approach)

The goal of this assignment is to evaluate a binary classification model using the provided dataset. Before writing any code, I read the article on classification metrics that was assigned, which explains confusion matrices, accuracy, precision, recall, and F1 score using a cancer diagnosis example.

My plan is to first calculate the null error rate, basically how accurate a model would be if it just guessed the majority class every time. The article’s example showed that a bad model can still get 95% accuracy if the data is imbalanced, so I want to check whether the penguin data has that same issue before trusting any accuracy numbers later.

Next, I’ll compute confusion matrices at three thresholds (0.2, 0.5, 0.8) by comparing “.pred_female” to each threshold myself, rather than using the “.pred_class” column that’s already in the file. From each confusion matrix I’ll calculate Accuracy, Precision, Recall, and F1.

The first challenge I anticipate is making sure I don’t mix up which class counts as “positive.” The second challenge will be figuring out a good way to present three confusion matrices and a metrics table clearly instead of just dumping numbers into the document. Once I have the results, I plan to think through the precision/recall tradeoff to explain when a lower or higher threshold would make more sense in practice.