trevorstephens / gplearn

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

Naming variables in GPlearn equation results and tree output #299

Closed ralphcrott closed 6 months ago

ralphcrott commented 6 months ago

Is it possible to have GPlearn to allocate directly or indirectly the individual names of an imported dataframe in the resulting SR equation and regression tree ?

trevorstephens commented 6 months ago

Yes, just pass the list of feature names to the feature_names parameter and it will use them in the print and graphviz plot outputs