Summation over n elements #198
-
Hello, For example: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @DenisSvirin, For problems like this, where you sum a function over a set, I recommend taking the approach specified in this paper: https://arxiv.org/abs/2006.11287 (youtube video here: https://www.youtube.com/watch?v=HKJB0Bjo6tQ). The basic idea is you learn neural network of the form For your operators, you would probably want to define cond(x::T, y::T) where {T} = (x > zero(T)) ? y : zero(T) as a binary operator - then it could learn that |
Beta Was this translation helpful? Give feedback.
-
Is there a way (or any research outside PySR) to actually allow aggregation operators (such as sums)? |
Beta Was this translation helpful? Give feedback.
Hi @DenisSvirin,
For problems like this, where you sum a function over a set, I recommend taking the approach specified in this paper: https://arxiv.org/abs/2006.11287 (youtube video here: https://www.youtube.com/watch?v=HKJB0Bjo6tQ).
The basic idea is you learn neural network of the form$y = f(\sum_i g(x_i))$ . You would set $f$ and $g$ equal to multi-layer perceptrons. Optimize them, and then fit symbolic forms to their input and output. You can see an example of exactly this functional form in the last example of this PySR tutorial: https://colab.research.google.com/github/MilesCranmer/PySR/blob/master/examples/pysr_demo.ipynb (scroll to near the end).
For your operators, you would pro…