Metric Learning in an RKHS