LMNN: fix mistake and improve performances (#78)
LMNN: fix mistake and improve performances (#78)

Fix mistake in LMNN

Issue in function _find_impostors:
 - the squared euclidean distance is used to compute the margins in variable "margin_radii"
 - the euclidean distance is used (through the function sklearn.metrics.pairwise.pairwise_distances) to compute distances between samples of different labels in variable "dist"
 - the issue is that the impostors are found by testing "dist < margin_radii" which is wrong because "dist" represent distances, and "margin_radii" represent squared distances.

I propose to solve this problem by computing always the squared distances.
terrytangyuan/metric-learn,all-umass/metric-learn