title: Why is the 'weighted' average F1 score from sklearns classification report different from the F1 score calculated from the formula?
body: <p>I tried calculating the 'weighted' f1 score using sklearns classification report and it seems to be different from when calculating the f1 score using <code>F1 = 2*((p*r)/(p+r))</code>. For example:</p>
  
  <p>looking at the example found <a href="https://scikit-learn.org/stable/modules/generated/sklearn.metrics.classification_report.html#sklearn.metrics.classification_report" rel="nofollow noreferrer">here</a> looking at the weighted average line:</p>
  
  <pre><code>                precision    recall  f1-score   support
  weighted avg       0.70      0.60      0.61         5
  </code></pre>
  
  <p>when calculating it out I get: <code>0.646153846 = 2*((0.70*0.60)/(0.70+0.60))</code> which is different from <code>0.61</code>. Why is this? How is this f1 score calculated?</p>