MCPcopy Index your code
hub / github.com/clips/pattern / F

Function F

pattern/metrics.py:164–169  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

162 return test(classify, documents, average)[3]
163
164def 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

Callers 1

canvas.jsFile · 0.85

Calls 1

testFunction · 0.85

Tested by

no test coverage detected