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

采纳的回答

Greg Heath
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
  1 个评论
ampaul
ampaul 2017-6-22
Thank you, Greg. I have a few questions regarding your answer.
1. What documentation example are you referring to?
2. My input size is 60*300. My target size is 6*300.. what do you mean when you say to calculate?
3. What do you mean by remove all default assignments?
4. Should I run each technique several times with randomness eliminated? Forgive me for my lack of understanding, but would that not generate the same result every time?
As far as my results, I have attached both the confusion matrix and the performance plot.
<<
>>
Elapsed time is 0.590172 seconds. I hope that this helps. Thank you again

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile 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!

Translated by