where N is the number of samples, k is the size of the neighborhood in the reduced space, U i is the set of points that are not neighbours in the original space but are now neighbors in the reduced space and r(i, j) is the rank of the sample j according to its distance from i in the original space .