Learning a Distance Metric from Relative Comparisons