v1.6.1
Bug Fixes
Fixed a bug in mean_average_precision
in AccuracyCalculator
. Previously, the divisor for each sample was the number of correctly retrieved samples. In the new version, the divisor for each sample is min(k, num_relevant)
.
For example, if class "A" has 11 samples, then num_relevant
is 11 for every sample with the label "A".
- If
k = 5
, meaning that 5 nearest neighbors are retrieved for each sample, then the divisor will be 5. - If
k = 100
, meaning that 100 nearest neighbors are retrieved for each sample, then the divisor will be 11.
The bug in previous versions did not affect mean_average_precision_at_r
.
Other minor changes
Added additional shape checks to AccuracyCalculator.get_accuracy
.