trevorstephens / gplearn

Genetic Programming in Python, with a scikit-learn inspired API
http://gplearn.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.56k stars 274 forks source link

Is it possible to access programs inside make_fitness? #277

Closed fnssm26 closed 1 year ago

fnssm26 commented 1 year ago

Hello!

I would like to know if it is possible to access the expressions inside make_fitness. Currently I can only access the three parameters y, y_pred, and w.

The idea is to run a set of simulations using an expression to make decisions (to solve prescriptive problems where an objective function needs to be minimized).

Best regards, fnssm

trevorstephens commented 1 year ago

It isn't possible to access the program, just assess goodness of fit via the y's. You may be able to modify the source code to support that in _program.py though it is not on my roadmap to support it out of the box presently.