TransWikia.com

How to use Cross Validation data set?

Data Science Asked by kern on December 13, 2020

I am new to data science, and the dataset I am working on is divided into train set, test set, and validation set.
However, till now I was splitting the data with train_test_split. I expected model.fit() would have an option like validation =. But, there is none.
How I can use the CV set to improve results?

One Answer

Well, there are ways to do it within model.fit(). Namely, you can define validation_split parameter, (e.g. 0.2 or 0.3) which represents a percentage of the data that will be used as a validation in training (0.2 = 20%, 0.3 = 30%). The second way, when you have your validation data, is to use validation_data = (x_val, y_val), where you just pass your validation x and y

Answered by Ivan Petrovic Markovic on December 13, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP