how to write a code for fitness function(i don't have the exact fitness function but have the training data)?

i have training data with 3 input parameters and 2 output parameters, based on that I want to use neural network to train that data and use it as a fitness function in optimization of output parameters using genetic algorithm.

4 Comments

What you are asking doesn't make sense. What exactly do you mean when you say that you want to use the genetic algorithm on a trained network to optimize output parameters.
What output parameters? What are you trying to minimize or maximize?
If I understand correctly, your genetic algorithm will take three parameters, and will pass the three parameters into a NN prediction routine that has been trained on the training data, with the NN prediction routine predicting two outputs, and the genetic algorithm will then use those two outputs to compute a fitness value? So the overall task of the genetic algorithm stage will be to find the three inputs that predict two values that when passed into the fitness function have the smallest result?
thanks for the reply, actually i am trying to maximize the 2 outputs. Using neural network i was actually able to train the network, but to maximize the output using genetic algorithm i need an objective function , i am asking how to call that neural network as an objective function. Basically , i have certain data by which i created the neural network and trained it so that for given inputs it could predict the outputs in future . Now i want to use Neural network as an objective function and maximize both the outputs
suppose (x1,x2,x3) be my inputs and (y1,y2) be my outputs, i have data for certain set of values of (x1,x2,x3)and corresponding (y1,y2) values. using those sets of values, i tried to create a network so that it could predict the values of (y1&y2) for unknown set of (x1,x2,x3). Now i want to find the values of (x1,x2,x3) in the given bound{i,e., i want to give a lower and upper bounds for each x} for which both the outputs y1 and y2 are maximum(i.e, non-inferior solutions) using genetic algorithm

Sign in to comment.

 Accepted Answer

So far, the problem is ill-posed because " for which both the outputs y1 and y2 are maximum " doesn't make sense.
There is no guarantee that the maxima of y1 and y2, will occur for the same set of input values.
You have to define a single valued function, for example y1^2 + y2^2
Hope this helps.
*Thank you for formally accepting my answer*
Greg

2 Comments

Hello greg, thank you for the reply. I know that the maxima of y1 and y2 , will not occur for the same set of input values, so that's why i asking for non-inferior solutions(i.e., by using multibjective optimization){syntax-gamultiobj) But my question is how to connect that neural network as an objective function for optimization.Plz provide answer with example. Thank you
Weights plus Biases plus Transfer function =outputs for GA. In you case for MO. You found mathematically form this

Sign in to comment.

More Answers (1)

Dear sethu,
I have a similar problem. I am able to
run an external simulator to obtain
corresponding outputs for the certain
inputs. Or I could avoid dynamic
cosimulation with the external
simulator, run a parametric analysis
with the simulator, and finally use a
set of inputs-outputs data to find a
mapping function. But, for each case,
the question still is that how could I
define the objective function in a
genetic algorithm code. Did you succeed
to solve the problem?
Regards, Milad

Categories

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

Asked:

on 8 Jun 2015

Edited:

on 26 Sep 2016

Community Treasure Hunt

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

Start Hunting!