Why did my Consumer Shop? Learning an Efficient Distance Metric for Retailer Transaction Data