How to restrict specific variables from being used inside trigonometric functions in PySR? #1063
Unanswered
tomalexTUD
asked this question in
Q&A
Replies: 1 comment
-
|
Hello! Do these help at all?
best, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello PySR Community :)
I would like to constrain the search space in PySR in a specific way. I want to allow certain variables to be used as arguments for trigonometric functions (like sin, cos, tan), while simultaneously preventing other variables from being used within them.
For example, let's say I have the input variables x1, x2, and x3. My goal is to let PySR generate expressions such as cos(x1) or sin(x1), but to forbid it from generating expressions like cos(x2) or sin(x3). The variables x2 and x3 should still be usable in the rest of the equation, just not inside trigonometric functions.
Is this kind of constraint possible to implement using template expressions? Or would I need to use a different approach, perhaps by creating a custom helper function or using another feature?
Thank you for your guidance!
Beta Was this translation helpful? Give feedback.
All reactions