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 で Parallel and Cloud についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!