prepare_data function

Generate data used for predictions and Monte Carlo integration