Kernel Methods for Metric Estimation