Robust Correction of Sampling Bias using Cumulative Distribution Functions