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

1 view (last 30 days)
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
sachin saxena
sachin saxena on 13 Jun 2014
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

Greg Heath
Greg Heath on 14 Jun 2014
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
sachin saxena
sachin saxena on 17 Jun 2014
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
Greg Heath
Greg Heath on 18 Jun 2014
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)

Greg Heath
Greg Heath on 13 Jun 2014
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
sachin saxena
sachin saxena on 14 Jun 2014
Edited: sachin saxena on 14 Jun 2014
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.

Community Treasure Hunt

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

Start Hunting!