How can I improve my neural network further?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello, I have built a neural network and generated code simply by using the patternnet tool in nnstart. I am happy do say that with this code, I was already able to achieve a performance of 0.0076. However, I want to improve the network even further. Do you have any resources (or could show where to start) for improving a process? Should I look to other training functions? Thank you.
% trainingdata - input data.
% targetdata - target data.
x = trainingdata;
t = targetdata;
% Choose a Training Function
trainFcn = 'trainscg'; % Scaled conjugate gradient backpropagation.
% Create a Pattern Recognition Network
hiddenLayerSize = 10;
net = patternnet(hiddenLayerSize, trainFcn);
% Setup Division of Data for Training, Validation, Testing
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
% Train the Network
[net,tr] = train(net,x,t);
% Test the Network
y = net(x);
e = gsubtract(t,y);
performance = perform(net,t,y)
tind = vec2ind(t);
yind = vec2ind(y);
percentErrors = sum(tind ~= yind)/numel(tind);
view(net)
- Item one
- Item two
댓글 수: 0
채택된 답변
Greg Heath
2017년 6월 22일
1. Start with the documentation example
2. Explicitly calculate the input and target sizes
3. Remove all default assignment statements
(Probably faster than commenting them)
4. Initialize the RNG so that you can duplicate the results
5. Run each technique at least 10 times
6. Time each run
7. Test on a variety of data sizes.
8. Post numerical results that are readily understandable
to the average person, For example, which of the following
results is good?
a. performance(net,t,y) = 0.1
b. mse(t-y) = 0.1
Answers
a. My MATLAB isn't installed. So I don't know what computation
"performance" yields. Is it different for fitnet and patternnet?
b. It depends on the scale of the target values.
Hope this helps.
Thank you for formally accepting my answer
Greg
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!