Algorithm to replace missing data in a dataset.