Combining training and validation data for last training

How can I combine training and validation data using library if I want to train the best version of my model before for example I submit result for Kaggle competition?

1 Like

I also wondered about this, if it is a good idea to drop the validation? The validation loss might increase as new training data is introduced?

To answer the question, can you supply the format of the data? In case of separate data frames maybe you can do something like

df_train = pd.read_csv(path/'train.csv')
df_validation = pd.read_csv(path/'validation.csv')
df_total = pd.concat([df_train, df_validation])
1 Like


My question was in general. Possibly in case of participating in Kaggle competition it make sense to train the last version on all the data including one that was put aside as a validation set.
I think Jeremy mentioned this idea, possible in his Machine Learning course.

I did not try it yet. If I will participate in one of the future Kaggle competitions, I will try it.

1 Like

Cool! I would love to hear about your results later as I also was considering this.
Good luck with the competition!