A sub-sampling algorithm preventing outliers