How can I improve my neural network further?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Greg Heath
le 22 Juin 2017
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
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!