Is validation_split=0.2 in Keras a cross-validation?

Viewed 1134

I'm a self-taught Python user. In Python codes,

model.fit(x_train, y_train, verbose=1, validation_split=0.2, shuffle=True, epochs=20000)

Then, 80% of the data is used for training and 20% is used for validation, and the epoch is repeated 20,000 times for training.

And,

shuffle=True

So, I think this code is a cross-validation, or more specifically, a k-divisional cross-validation with k=5. I was wondering if this is correct, because when I looked up the Keras code for k-fold cross-validation, I found some code that uses Scikit-learn's Kfold.

I apologize for the rudimentary nature of this question, but I would appreciate it if you could help me.

1 Answers

The model first shuffles the data and then splits it to train and validation
For the next epoch, the train & validation have already been defined in the first epoch, so it does not shuffle & split again, but uses the previously defined datasets.

Therefore, it is a cross-validation.

Related