Changed trainingExamples function to return entire dataframe, X, y, Xval and yval.