Clarification on why K * x4/x0 is considered dimensional under dimensionless_constants_only=True #1084
Unanswered
arasugurlu
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Yeah this is what Regarding "both x4 and x0 have units of length (meters)", this isn't true, because you wrote:
There is only one feature with units of length. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
Hi Miles — thanks again for the earlier response. I want to clarify one specific point because I’m still not fully understanding the mechanism behind your explanation.
You wrote:
“Because
K * x4 / x0has dimensions, and thereforeexp(K * x4 / x0)is invalid.”You can see the answer in the following link:
#1078
In my setup, both
x4andx0have units of length (meters), andKis a pure number. Under normal dimensional analysis,K * x4 / x0should be dimensionless since the length units cancel. Therefore, I don’t understand in which sense PySR is treating that term as dimensional.This matters because when I set
dimensionless_constants_only=True, PySR produces dimensionally consistent expressions but never producesexp(...). When I set it toFalse, I do get exponentials, but I also get dimensionally inconsistent structures like:which is inconsistent unless the fitted constant carries a length unit.
So here are the specific points I am trying to understand:
When you say “K * x4/x0 has dimensions,” do you mean that PySR internally needs to assign physical units to
K(for example1/m) to satisfy the output-unit constraints elsewhere in the expression, and that this requirement is incompatible withdimensionless_constants_only=True?Is the reason
expbecomes “impossible” underdimensionless_constants_only=Truethat PySR cannot make the exponent dimensionless without giving the constant a unit, which violates the constraint?In other words, is the core issue that the search cannot satisfy simultaneously:
exprequires a dimensionless argument,I’m trying to confirm whether this interpretation is correct, or whether I am misunderstanding how PySR assigns or propagates units internally.
I simply want to use the exp function while keeping my resulting expression fully dimensionally consistent.
Thanks for the clarification — I want to fully understand the logic before deciding how to restructure my inputs.
Beta Was this translation helpful? Give feedback.
All reactions