-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About implementing specific custom primitives #32
Comments
Hi, yes this is theoretically possible. This is what the The idea is to define a custom function and register it in the dispatch table. Here is an example:
The atomic potentials code relies on an older version of Operon but you should be able to make it work with the latest If you run into issues or find bugs please let me know. |
Thanks a lot for the detailed explanation and links to the files. I am now understanding the code better. Let me try to implement the idea and update. Appreciate the prompt response! |
I was slowly learning the concepts, and there is a few more questions if you don't mind.
Thanks a lot! Still, sorry if some of the questions seems dumb, I didn't have time to full go through all the detailed code yet. |
The
In general I've noticed that the choice of creator does not make a difference in algorithm performance. I would recommend using the
Yes, this was a big change from before, in the interest of making it easier to program the entire tree evaluation / optimization infrastructure and integration with likelihoods. The tree is kept in the So normally you'd want to use an interpreter in a context where you already have an individual, so then you'd pass Similar to here: https://github.com/heal-research/operon/blob/cpp20/source/operators/evaluator.cpp#L196 |
Thank you for the explanation! I now understand why using One more question about I am actually creating the
If Thanks! |
Hi,
Normally you shouldn't need to initialize the interpreter yourself. The flow should be: The specific type of interpreter can be passed as a template parameter to the
The interpreter will know how to evaluate any kind of tree (or, more accurately, any type of node inside the tree) by querying the dispatch table for the appropriate function primitive. The interpreter is meant to be a lightweight cheap object initialized on the spot whenever a tree needs to be interpreted (so you'd construct an interpreter within an evaluator context when you already have a tree). You do not need to construct an interpreter manually before the algorithm. If you show me your code I can assist more. |
This issue is stale because it has been open for 30 days with no activity. |
Sorry about using GitHub issues for asking questions again. After switching to
cpp20
branch I was able to successfully run examples. Thanks!Now I would like to discuss on whether (and how) the following can be achieved. The dataset that I having is actually a time series which is ordered. This means that theoretically primitives such as "shift 1" and "shift -1" or "rolling mean" are valid primitives that can batch operate on each of the original variables and intermediate variables. After briefly reading the code, mainly functions.hpp, I have a few questions on how to implement the above:
uint64_t
?function.cpp
is called, it is called on a batch of a variable or intermediate. Is it possible to make it call across the whole dataset (across the data point dimension, which in the time series case is the time dimension)?Thank you!
The text was updated successfully, but these errors were encountered: