Can the use of EarlyStopping() offset overfitting problems caused by validation_split?
Keras gives users the option, while fitting a model, to split the data into train/test samples using the parameter validation_split.
Example:
model = Sequential()
model.add(Dense(3, activation = 'relu'))
/// Compile model ///
model.fit(X_train, y_train, validation_split = 0.2)
However, my intuition suggests that using validation_split (as opposed to creating train, test samples before fitting the model) will cause overfitting, since although validation_split splits the batches into train and test at each epoch, the overall effect is that the entire dataset is 'seen' by the model.
I was wondering if:
my intuition is correct
assuming that 1) is true, if there are any circumstances where using the EarlyStopping() callback and validation_split would be better than splitting the data into train/test before fitting the model
Topic early-stopping keras cross-validation
Category Data Science