Hi I have read, that noise can help improve the robustness of a neural network if it is applied correctly.
I have a network with 7 inputs, and three hidden layers with 12, 6 and 3 neurons respectively, I then have an output layer with 1 neuron.
This is a very simple extension of one of the tutorials:
hiddenLayerSize = [l1, l2, l3];
net = fitnet(hiddenLayerSize,trainFcn)
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
[net,tr] = train(net,x,t);
I learned about processFcns when trying to normalise my inputs and noticing odd behaviour because minmaxmap was already being applied, scaling my features to the -1 to 1 range on a per column (feature) basis.
I am unsure how to add some random noise to the code above as I couldn't find any pre processing function that would enable it.
I would like:
- The noise to only be applied to training data, not the validation data.
- The noise to be added after the normalisation step so it affects each input irrelvant of the magnitude and range of the unnormalised features.
Because of these requirements I'm really unsure how to proceed, as a lot of these steps look to be automated.
Should I just set trainRatio to 100% and test the network's performance with an external call along the lines of afterwards?
performance = perform(net,t,y)
If I did it this way I could make sure I do not apply the noise to the validation data. I would also have to remove the processFcns that normalizes the data, do it manually first, then apply my noise and then pass it to the train(net,x,t) with the automatic processFcns disabled.
Is there an easier way to do it? I would really like it if I could keep using Matlab's training panel which is great and does the training,testing and validation in a nice interface.
Thanks