Correct the method to calculate mean average precision