title: How to silence all sklearn warning
body: <p>I am using F1_score metrics in sklearn. For some training data sets, the total number of y=1(rare case) sets is zero, the F1_score is zero,which is normal. But the sklearn gives the following warning:</p>
  
  <blockquote>
    <p>"UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 due to no predicted samples".</p>
  </blockquote>
  
  <p>Does anyone know how to silence this warning? and in general could we silence all kinds of warnings in sklearn ?</p>