Replies: 1 comment 8 replies
-
Hi @TadeuNP, Very interesting idea. I think implementing this really depends on specific requirements. If you just want to query x in the past, you could certainly create a unary operator that takes a scalar argument, converts it to integer inside the function (type conversion is allowed - see the prime number example in the docs page on code examples), and indexes the correct row. However, all operators assume they are applied element-wise without changing functional form, so if you need the row index of the x, you will need to do some hacking.
Cheers, |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm trying to use PySR to identify some equations with a certain$\tau$ dependence on the past, similar to the following delayed differential equation,
One way of doing it is by introducing a new column with shifted data, but I was hoping for a method that allowed PySR itself to look for$\tau$ . I thought about defining a binary operator B(x, tau) that returns the value of x at tau time steps ago, but looking at the file that defines the operators, it seems they only work with a single scalar value as input, so it looks incompatible.
Is there a way? Any suggestion?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions