Does using ANN as the fitness function minimizes all the outputs of ANN ?

Ive developed an ANN ,2-14-3, and using it as a Fitness Function with gamultiobj .Will the genetic Algo. minimize all the 3 outputs?

2 Comments

That depends on how you wrote your fitness function.
The function value is simply the network output.. function K = network123(X);
K=sim(network1,X);
end
I suppose this will minimize all 3 outputs right?

Sign in to comment.

 Accepted Answer

Again,
Outputs are not fitness functions. Fitness functions are nonnegative functions of the matrix output matrix, y, and target matrix, t, that go to zero as the output approaches the target.
Use the help and doc commands on
sse, sae, mse and mae.
Google cross entropy
Hope this helps.
Greg

5 Comments

The Fitness function i've written takes in 2 values(x1,x2) n outputs 3 value matrix(say,[y1;y2;y3]), since it is defined as K=network13([x1;x2]),where network13 is a 2-14-3 ANN.I want to find x1,x2 so that each of the three y1,y2 and y3 is minimized.Anything wrong here?
Yes. I repeat: The output of a NN is not a fitness function. Go back and read my last comment. A fitness function outputs a scalar nonnegative measure of how close an output is to a target
What is your output transfer function? Does it have a bounded output lower bound so that minimization means either 0(logsig) or -1(tansig)???
Ok. Can you tell me how to move ahead with my task.I have made a NN and want to optimize the input parameters so that all 3 outputs are minimized,using gamultiobj.Basically,help me with the hybrid ANN-GA . I have tansig as output transfer function.
Thanks!
Btw ,on using ANN as the fitness function ,GA is working n showing optimal solutions.Though,an intuitive look at the solutions make me believe that it is working as it is intended to.But, still i want to confirm it.
Also, you are wrong when you say " A fitness function outputs a scalar ..".It is not always the case.A fitness function can be vectorized.For reference, see here :http://www.mathworks.in/help/gads/examples/coding-and-minimizing-a-fitness-function-using-the-genetic-algorithm.html#zmw57dd0e1881
Thank you for the reference. Now I can see why you are so confused.
A fitness function outputs a scalar value, feval.
A so called vectorized fitness function is a function of one or more vectors yielding a scalar output value that is to be optimized (typically, minimized; if it is to be maximized, a common practice is to minimize it's negative).
A NN is designed to output one of N specified O-dimensional target vector variables t1, t2,...tN when the corresponding specified I-dimensional input vector variable, x1,x2,... or xN is presented. In order to do that an algorithm is needed that will find one or more parameter vectors ("weight" vectors, NOT variable vectors) that will minimize a specified objective function of the output, y, and the target, t. The most common is mean-squared-error (AKA MSE).
In general, the term "fitness function" is not NN jargon. However, one way to obtain an approximate answer is to use a genetic algorithm which uses that terminology.
Again, w.r.t. NNs, the fitness function is an objective function that is a nonnegative scalar function of the difference between a matrix of column vector NN outputs and a corresponding matrix of column vector targets.
The GA is used to try to minimize that function by selecting a set of weights that can be represented in vector form.
Therefore, the problem that you have described makes no sense.
Hope this helps.
Greg

Sign in to comment.

More Answers (1)

No.
The network is designed to minimize the statistical estimate of a fitness function like mean-squared-error. There are no constraints with respect to outputs of single inputs.
Hope this helps.
Thank you for formally accepting my answer
Greg

2 Comments

Hi, You got it wrong. I meant to say that will the GA try to minimize all the 3 outputs for the fitness function K ,where network1 is a 2-14-3 neural network.
function K = network123(X);
K=sim(network1,X);

Sign in to comment.

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!