Closed kuraisle closed 1 week ago
Add a
class PrecisionMetric(InformationRetrievalMetric)
That calculates the precision of a result from an Information retrieval pipeline.
With the expected list of values
["banana", "apple", "orange", "pear"]
and the prediction
(or any subset of that prediction), PrecisionMetric.calculate(...) should return 1.0
PrecisionMetric.calculate(...)
With the prediction
["banana", "apple", "blackberry", "snozzberry"]
PrecisionMetric.calculate(...) should return 0.5
Add a
That calculates the precision of a result from an Information retrieval pipeline.
Tests
With the expected list of values
and the prediction
(or any subset of that prediction),
PrecisionMetric.calculate(...)
should return 1.0With the prediction
PrecisionMetric.calculate(...)
should return 0.5