Health-Informatics-UoN / lettuce

MIT License
2 stars 0 forks source link

Add F score metric #56

Closed kuraisle closed 6 days ago

kuraisle commented 1 month ago

As

We need a

class FScoreMetric(InformationRetrievalMetric):

that calculates the F score for information retrieval pipelines.

$$ F_{\beta} = (1+\beta^2) \frac{precision \cdot recall}{(\beta^2 \cdot precision) + recall} $$

So the __init__() should take an additional $\beta$ parameter for the relative weighting of precision and recall