Open c0def0x01 opened 1 year ago
Not really sure what is gained here? The whole package has the functionality to essentially execute the program via the .predict
methods.
The closest might be to extract the underlying _Program
objects and work with those directly. I don't have any plans at this stage to make those object accessible via a public API at this stage though.
If you just want to use the program later, you can export it: https://gplearn.readthedocs.io/en/stable/advanced.html#exporting
Is there a way with gplearn to get the program provided by the symbolic regressor e.g. ˋsub(div(mul(X4, X12), div(X9, X9)), sub(div(X11, X12), add(X12, X0)))ˋ into an executable Python program e.g.
Would it be useful to enhance this in gplearn, or is there better ways to do this?