What is the real value

3 views (last 30 days)
Jack
Jack on 2 Jun 2015
Commented: Rena Berman on 12 Jan 2017
Hello every body,
I tried to optimize features selection problem using GA,and the optimizing code implementing well, but the problem is, when i get the results. the result is like that 1 0 0 1 1 0 0 0 1 0 1 0 0 1 0 1 1 0 1 1 1 1 0 0 0 0 0 1 which is the x selected of GA, What is that mean?? how i can recognize the real value selected??
dlmwrite('selected.GA',x,'delimiter','\n');
  2 Comments
Jack
Jack on 2 Jun 2015
what is the above value represent???
please any help, Thanks in advance
Rena Berman
Rena Berman on 12 Jan 2017
(Answers Dev) Restored question.

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 2 Jun 2015
That result is the optimal vector of ‘features’ (in your implementation) that your GA has selected. To understand what it means, give it as the argument to your fitness function and see what the output is.
  2 Comments
Walter Roberson
Walter Roberson on 2 Jun 2015
The first feature was selected. The second and third were not selected. The fourth was selected. The fifth was selected. And so on.
Star Strider
Star Strider on 14 Jun 2015
The ga fitness function takes only one argument, a vector with one element for each variable you want to optimise. So if your fitness function is named ‘fitfun’, do something like this:
V = [1 0 0 1 1 0 0 0 1 0 1 0 0 1 0 1 1 0 1 1 1 1 0 0 0 0 0 1];
out = fitfun(V)
The ‘out’ variable is a scalar value that is the result of its evaluating ‘V’. That is up to you to interpret.
You may want to create a second version of ‘fitfun’ if you want output that is more meaningful than a single scalar value (perhaps one that tells you in detail the features the genetic algorithm has chosen).

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!