MATLAB: Do Train and Test have to be in the same file – Neural Network Matlab Toolbox

Deep Learning Toolboxinput selectionneural netwokstest and train

Hello,
I am using Neural Network toolbox for pattern recognition. I split my data to train and test. I was able to train the network with train data. Now I want to run my test data through the network and obtain some results.
My questions are:
Is there a way to disable the training on the test data and just run the test by using the previous training results? Or do I need to combine my test and train data as one file and adjust the ratio of testing/training/validation?
I was hoping to be able to train on one set of data and then run different sets of test data without having to go through training again. Is such a thing possible?
Thank you in advance for your help.

Best Answer

The training algorithm does not estimate weights using validation or test data.
data = design + test;
design = train + val
train: Estimates weights and biases
val : Stops training when performance on the non-training val data is optimized
test : Obtains an UNBIASED estimate of performance on unseen non-training data
You should be able to train with any combination of val and test data. Test data does not affect training. However val data provides one of several stopping options that is explicitly designed to prevent poor performance on non-training data.
Regardless of the combination used when training, the net can be saved and used on unseen data
save net
delete net % from working space
load net
ynew = net(xnew)
Hope this helps
Thank you for formally accepting my answer
Greg .