Replies: 2 comments 1 reply
-
If your expression is polynomials only up to degree 2, then you are likely better off avoiding If you still need the power law, maybe you could define a custom operator? For example binary_operators=[..., "mypow(x,y)=x^(y.re)"],
extra_sympy_mappings ={"mypow": lambda x,y: x**re(y)} # give sympy equivalent If you want only integers you could further use mypow(x, y) = x^ceil(Int, y.re) for further tuning advice I would check out https://astroautomata.com/PySR/tuning/ |
Beta Was this translation helpful? Give feedback.
0 replies
-
Also - for your loss function, this is a simpler equivalent: f(x, y) = abs2(x - y)/abs2(x) Note that the form of this is |
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
-
I am trying to back the impedance expression or at least the rational polynomial equivalent from which a complex data was generated. However, the final expression (best model) doesn't seem close to the actual. Although the fit is not that bad, it's not perfect either. I also noticed that the "s" variable was having a complex exponent which is not supposed to be. Therefore, I would like to constrain the exponent to always be real. The loss function used is the classic loss function used in complex nonlinear least squares in impedance spectroscopy. I would also like to know how I could further choose hyperparameters which might help. Below is my working example:
Beta Was this translation helpful? Give feedback.
All reactions