Consider the model
fit2 <- glm(y~x+z,data=records,family=binomial)
I have about 42000 records, of which close to 38000 belong to class y=0 and the remaining 4000 belong to class y=1. In order for me to compute the confusion matrix, I need to select a threshold t against which I need to compare the probabilities of the above model. How do I select this t?
Assuming my positive class to be the rare class, the risk of predicting a positive instance as negative is higher than the risk of predicting a negative instance as positive.
Should I use the threshold that maximizes sensitivity alone? or should I use the threshold that maximizes both sensitivity and specificity?