subsample when n>1000 in median heuristic computations