Replies: 3 comments 2 replies
-
|
Hi @AlbanMor, Very interesting idea. Right now there is not a built-in way to do this. But ideas appreciated. Right now you could hack it – I think the easiest way to do something like this is to simply turn it into a single equation search (rather than 3), and pass the index of the equation (y1, y2, y3) as an additional feature. Then it could find something like this: which as you can see gives you all (You can pass I'm sure there's a smarter way to do this though... Ideas appreciated! Cheers, |
Beta Was this translation helpful? Give feedback.
-
|
I don't know the intricacies of your code but what I understand is that you first "evolve the operator tree" (sorry if i don't use the right terms) and then fit the constants values to the data. if these are separate steps, the fitting procedure could be done separately on each traces and return an average goodness of fit for that "operator tree". You could then judge how successful the "new evolved tree" is and continue to the next "evolution/mutation". That would ensure that the same "operator tree" is used for all traces. |
Beta Was this translation helpful? Give feedback.
-
|
One of the only hits to show up for this problem ('generalized form', 'fitting multiple datasets with a single expression'); it seems the documentation in PySR and SR.jl is split between calling these Template expressions (that you make highly restricted), Parametrized template expressions, Parametrized expressions, Class-dependent or Per-class problems. This post is Jan 22, 2024 - a similar issue was solved here (Jun 24, 2024 -> Aug 25, 2025): astroautomata/SymbolicRegression.jl#316 with "Template expressions" that are implemented in PySR with examples here: https://github.com/MilesCranmer/PySR/blob/225e0a568ff614238de04620fd9b91c2bdf34cc2/docs/src/examples.md#template-expressions and in Julia here: https://github.com/MilesCranmer/SymbolicRegression.jl/blob/082c2dfe1b8a950aa12e9be3a003ecd7f629eb45/docs/src/examples.md with (dead) link to an example, probably similar to this: https://github.com/MilesCranmer/SymbolicRegression.jl/blob/082c2dfe1b8a950aa12e9be3a003ecd7f629eb45/examples/parameterized_function.jl#L52 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
First off, congratulation on this awesome package!
I was wondering if there is a way to use PySR to identify a generalized form of the equation ruling different traces. A simple example would be identifying the equation "ax+b" from the following traces : y1 = 2x1+3, y2= 3x2+5, y3= -1x3 + 4 etc.
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions