ShuhuaGao / geppy

A framework for gene expression programming (an evolutionary algorithm) in Python
https://geppy.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
208 stars 76 forks source link

REgrading Reproductibility #14

Closed sayin closed 4 years ago

sayin commented 5 years ago

Hi, I am running UCI_power_plant symbolic regression problem. I see you use seed to reproduce the results. But when I am running the case, for each run with the same parameters used in the example, It results in different expressions. Is the seed for reproducing the train/test data or for the actual results?

ShuhuaGao commented 5 years ago

Hi,

The seed works wherever functions from np.random or random modules are called. It is weird that the results cannot be reproduced.

sayin commented 5 years ago

Thanks, I am still figuring out.

1) Furthermore regarding installation, when I pip install . , the package is installed but when we look into site-packages/geppy folder, the actual folders (algorithms, core, tools, support) are missing. I have to manually place them in that folder.

2) Which version of python is package built on? I am using 3.5 it gives error on no attribute random. choices but work fine in 3.6.

ShuhuaGao commented 5 years ago

Well, I originally tested it on Python 3.5. Of course, you can just use the latest version.

Your feedback is always desired once you figure it out, since it is not easy for me to reproduce these issues. Thank you!

sayin commented 5 years ago

Hi, Thank you for the reply, 1) Regarding reproducibility, in the basic.py module, I have added the following code for printing best model from every generation. If I remove the lines that I added, It works for reproducibility. Can you kindly help me in debugging this issue? Or is there a better way to print the best model from each generation? from ..support.simplification import simplify ## Added to the imports if verbose: print(logbook.stream) ind = hall_of_fame[0]
sym_best = simplify(ind) sym_best = ind.a * sym_best + ind.b print(sym_best)

sayin commented 5 years ago

Hi, Could you able to debug the issue?