Neural Network Function identification

7 views (last 30 days)
Description
I have 3 inputs and 12 outputs data. My programme need to be recognize the pattern from existing data, after that need to predict suitable outputs for new inputs. Every data have different range. Input (IP) 01 between 0.1 to 3, IP 02 between 1 to 8, IP 03 between 1 to 5, for first ten outputs (OP) between 0 to 0.25, 11th OP between 0 to 6, 12th OP between 0 to 0.15.
Question 01 The neural network start with random weights, the results also slightly differ everytime it is run. How can I control it to same outputs every time?
Question 02 I was in the mid of programming (attached below), what is the function prefer to use here to get the class indices?
>> x=Inputs; >> t=Targets; >> size(x)
ans =
3 100
>> size(t)
ans =
12 100
>> net=patternnet(20);
>> view(net)
>> [net,tr]=train(net,x,t);
>> plotperform(tr)
>> testX=x(:,tr.testInd);
>> testT=t(:,tr.testInd);
>> testY=net(testX);
>> testIndices=

Accepted Answer

Greg Heath
Greg Heath on 24 Jul 2013
To mitigate random initial weights in classifier design
1. Initialize the random number generator e.g., rng(0)
2. Design ~ 100 nets using a double loop over ~ 10 values of hidden nodes
j=0, h = Hmin:dH:Hmax, j=j+1 and ~ 10 random weight initializations
i = 1:Ntrials
3. For each design record
a. s(i,j) = rng % state of the rng
b. R2(i,j) and R2a(i,j)% Rsquared and degree-of-freedom adjusted Rsquared
c. Nerr(i,j) % Number of errors
4. Choose the net with the best combination of
a. Low validation error rate
b. Small number of hidden nodes
5. Details are in many of my posts. Search ANSWERS using (~17 hits)
patternnet Ntrials
Hope this helps.
Thank you for formally accepting my answer
Greg
  1 Comment
Greg Heath
Greg Heath on 24 Jul 2013
Notice that I omitted mention of dividing the data. See my posts for details.
However, if the number of training equations is very large compared to the number of unknown weights (Ntrneq >> Nw), you can omit dividing the data (help dividetrain) and just concentrate on training results.

Sign in to comment.

More Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!