Explore Courses Blog Tutorials Interview Questions
0 votes
in AI and Deep Learning by (50.2k points)

Let's say I have a set of training examples where A_i is an attribute and the outcome is binary (yes or no):


I know I have to define the fitness function. But what is it for this problem? In my actual problem, there are 10 parameters and 100 training examples but this is a similar problem.

1 Answer

0 votes
by (108k points)

The fitness function has the ability to measures how good your solution is. In particular, it should be able to handle whatever the available solutions generated and have to show the right way to improve them.

For example, a fitness function that is zero unless the answer is right is not good, because it doesn’t help you get an idea of how close the solution is to the right answer. Also, a fitness function that increases as solutions get better, but doesn’t identify the best solution is not so good either, because your population will improve up to a certain point and then get stuck.

For further knowledge about How you can define a Fitness Function in a Genetic Algorithm, refer the following link:

If you wish to know more about the Genetic Programming and Genetic Algorithm then visit this Artificial Intelligence Course.

Browse Categories