How to split data in Tensorflow
Table of contents
No headings in the article.
what are training and test data sets ! The 3 test set means you should split your data into 3 different sets.
Training set →the model learns from this data, which is typically 70–80 % of the total data you have available.
Validation set → the models gets tuned on this data, which is typically 10–15 % of the data available.
Test set → the model gets evaluated on this data to test what it has learned, this is typically 10–15 % of the total data available.
(usually, you get rid of the validation set (only training and training set) )
consider this :
You must learn calculus in your first semester, your booklet is your Training set which you will learn from.
and probably at the end of the semester, you will check your knowledge using practice exams, practice exams are your validation sets, you can test your knowledge and find out your weak points and be ready for the final exam (tweak your knowledge).
and the Test set is your final exam!
How to split our data into train and test sets in Tensorflow: we are going to drop the validation set, so we need a training set(80%), and a test set(20%)
#training set
Train_P = 80/100 #typically between 70-80 %
training_x = x[:(len(x)*Train_P)]
training-y = y[:(len(y)*Train_P)]
Test_P = 20/100 #typically between 10-15 %
training_x = x[(len(x)*Test_P):]
training-y = y[:(len(y)*Test_P):]
Just this, bye-bye.