prepare_datasets function

Prepare simulated datasets from the entire dataset