You can plot a ROC curve using sklearn library. This plot shows optimal threshold value.
Have a look at this post

  
      
      Towards Data Science – 26 Jun 18
  
  
    

Understanding AUC - ROC Curve 23

In Machine Learning, performance measurement is an essential task. So when it comes to a classification problem, we can count on an AUC …

  Reading time: 5 min read