Is it possible to exclude variable from an operator, without altering the complexity? #226
-
Hi, PySR looks promising with some features like "constraints" and "nested_constraints", which Eureqa did not seem to be capable of. Currently, to exclude the variable from an operator, e.g. "pow", we must play with complexity:
In this way, no variable can appear in the y position of x^y. However, this also makes the constants appears too frequently in the results. Is there a way to exclude variable from an operator without affecting complexity? I believe it can be useful for implementing domain knowledge. With kind regards, Mike |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
For custom constraints like this, the best thing is to write a function that checks the underlying expressions explicitly. This can be done by modifying the backend as described on this page: https://astroautomata.com/PySR/backend/. You will want to edit the |
Beta Was this translation helpful? Give feedback.
For custom constraints like this, the best thing is to write a function that checks the underlying expressions explicitly. This can be done by modifying the backend as described on this page: https://astroautomata.com/PySR/backend/. You will want to edit the
check_constraints
function to perform this check.