True positive and true negative

Hi, I have a problem with my binomial model. The data are 80000 observations (rows) and the main variable is a binomial 0,1. The problem is that almost 78000 of these observations are 0 and 2000 are 1.Obiously the model predicts with a lot of accuracy 0. But im interested in predict 1. How can I improve my true negative rate without removing a lot of 0 observations?
Thank you!

confusionMatrix(data = pred,testing$Alta)
Confusion Matrix and Statistics

                    Reference
        Prediction     0     1
                 0 33518   915
                 1   135   129
                                      
           Accuracy : 0.9697          
             95% CI : (0.9679, 0.9715)
No Information Rate : 0.9699          
P-Value [Acc > NIR] : 0.5828          
                                      
              Kappa : 0.1874          
                                      
 Mcnemar's Test P-Value : <2e-16          
                                      
        Sensitivity : 0.9960          
        Specificity : 0.1236          
     Pos Pred Value : 0.9734          
     Neg Pred Value : 0.4886          
         Prevalence : 0.9699          
     Detection Rate : 0.9660          
Detection Prevalence : 0.9924          
  Balanced Accuracy : 0.5598          
                                      
   'Positive' Class : 0

Hi @ugarte

This is discussed in great detail here

There is also a very good blog post here which i learned a tonne about sampling to improve performance as well as adjusting your probabilities afterwards

Thanks

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.