R Script to train and test of the prediction model