Dividing data for neural network
조회 수: 3 (최근 30일)
이전 댓글 표시
If I want to use dividerand and retraining for 10 times shoould the dividerand also be on the loop of 10 times or it should be out of the loop?
% dividing the data randomly
net.divideFcn = 'dividerand';
net.divideMode = 'sample'; % Divide up every sample
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
for j=1:100 % number of hidden neuron
net = feedforwardnet(j);
for i =1:10 % 10 times for creating 10 network
net = configure(net,inputs,targets);
[ net tr y e ] = train(net,inputs,targets);
save net
end
end
If the function "configure" can define different initial weights and rng, how about the different random dividing of data (which allocates 70/15/15 among train/val/test)? Should we use different division of dataset for each neuron or repetition ? or the division of datasets should be the same for each neuron? Thanks
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!