First check this link :
http://www.mathworks.com/matlabcentral/newsreader/view_thread/331830#911882
This a proposed method to create a neural network with train/test/validation
data sets. I have a optimization algorithm to optimize neural network inputs,number of neurons and layers (maximum 2) with this structure that presented here:
As you see this is main loops structure :
*Position_1(for weight initialization)*
for i=1:num_of_loops
*Position_2(for weight initialization)*
- repeating cross validation
for i=1:num_of_kfolds
*Position_3(for weight initialization)*
- Cross validation loop
end
end
First question : where should i initialize weights (with configure
function of patternent
neural network ( I have binary classification problem). position 1, position 2 or position 3?
Second question : where should i put rng(0)
. In first link we have this function before cross-validation loop. Why should i use this function and where should i set it for my proposed structure?
Ps. I'm using outer loop ( i=1:num_of_loops
) to have more reliable outputs. after finding best model I will use all neural networks of best model structure (num_of_loops*num_of_kfolds
), insert out-sample data to them and average between outputs.
Thanks.