average_precision function

Area under the precision recall curve