Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert variables names to original #73

Closed
jermaine1ronquillo opened this issue Feb 21, 2018 · 3 comments · Fixed by #119
Closed

convert variables names to original #73

jermaine1ronquillo opened this issue Feb 21, 2018 · 3 comments · Fixed by #119
Milestone

Comments

@jermaine1ronquillo
Copy link

Is it possible to convert the variables in the equation to its original name (instead of X1, X2...), and add mapping function to shorten variable names in case the names are too long? Can we use sympy to convert the equation? Thank you

@trevorstephens
Copy link
Owner

Where would you want to see this representation? The print function, or the program tree plot, or both? The print function could be problematic due to the feature names being related to the data and hence should only be passed to fit if conforming to the scikit-learn standard API. The graphviz plot might be more of an option as this is its own method and happens after fitting.

As for sympy I don't particularly want to go down that road as many of the built-in functions rely on closure which means there are a lot of rounding checks that don't fit neatly into the sympy world and user-defined functions add a whole other level of complexity to that. Happy to hear further thoughts on this or a PR but it is not something that I am prioritising right now.

@jermaine1ronquillo
Copy link
Author

Thank you for the response, the graphviz plot will do.

@trevorstephens
Copy link
Owner

Hey @jermaine1ronquillo ... I know it's been a while but would proposed changes in #119 work for you API wise? Allows specifying feature names during init of estimator for both print and graphviz, but I might think about how I fail here. Might be better to warn and output X's than error and give nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants