Optimizing Average Precision using Weakly Supervised Data