Returns the weighted harmonic mean of precision and recall, where recall is beta times more important than precision.
(classify=lambda document:False, documents=[], beta=1, average=None)
| 162 | return test(classify, documents, average)[3] |
| 163 | |
| 164 | def F(classify=lambda document:False, documents=[], beta=1, average=None): |
| 165 | """ Returns the weighted harmonic mean of precision and recall, |
| 166 | where recall is beta times more important than precision. |
| 167 | """ |
| 168 | A, P, R, F1 = test(classify, documents, average) |
| 169 | return (beta ** 2 + 1) * P * R / ((beta ** 2 * P + R) or 1) |
| 170 | |
| 171 | #### SENSITIVITY & SPECIFICITY ##################################################################### |
| 172 |