Information function - gpols_result.m

Syntax:
[sout,tree] = gpols_result(popu,info);

 sout String Information string
 tree Structure (tree) The best solution
 popu Structure (population) The input population
 info Scalar integer Asked information (0,1 or 2)


This function gets some information about the best member of the population variable.

Use info = 0 and popu = [] at the very beginning of your program to get a header string for info = 1: "Iter Fitness Solution".

Use info = 1 after every iteration to get a short information, e.g. "7. 0.729125 (y(k-2))+((u(k-1))*(u(k-1)))".

Use info = 2 at the end of your program to get detailed information about the final solution.
E.g.:
"fitness: 0.729125, mse: 0.462421
-0.638898 * (y(k-2)) +
0.493203 * ((u(k-1))*(u(k-1))) +
-0.069117"

If info > 0, than the function gives back the tree structure of the best solution (tree).

Example:

disp(gpols_result([],0));
gpols_mainloop(popu,X,Y,[],opt);
disp(gpols_result(popu,1));
disp(gpols_result(popu,2));