Comments (5)
I'm happy to have you pick out the details for us! I think you are correct above. However, it would be much better to actually show code examples where it's providing the wrong result, instead of relying on us re-interpreting the DSO logic :)
Also, we are happy to accept pull requests for this sort of thing! I think you know exactly the changes to be made :)
from deep-symbolic-optimization.
You'd hit the elif
when using a PlaceholderConstant
because the string will be something like "4.56" (not "const"
), so it adds a PlaceholderConstant
to traversal
.
E.g., str_tokens = ["add","4.56","x1"]
, where the Library
has a PlaceholderConstant
but not HardcodedConstant
.
from deep-symbolic-optimization.
-
In
program.py
we calltokens.tostring()
a few times, wheretokens
is annp.ndarray
withdtype=np.int32
. This is part of the NumPy API: https://numpy.org/doc/stable/reference/generated/numpy.ndarray.tostring.html. -
It is correct that
Program.library.const_token
isNone
when you haveHardcodedConstant
and noPlaceholderConstant
. However, if you have aHardcodedConstant
like 1.23 in yourLibrary
, you will not hit theelif
you quoted because the name of theHardcodedConstant
is "1.23", so the firstif
will beTrue
. -
Yes, it should be
assert U.is_float(const)
.
from deep-symbolic-optimization.
Ok thanks for your responses (here and by email !). I just realized that I figured it out months ago for the tostring
but I forgot. For the second question, I understand your answer, but then I don't see in what case you will have a float and hit the elif
. But that is not a problem, as it is a case I will not encounter I believe.
I close this issue, but may reopen it whenever I have other questions !
Thanks again !
from deep-symbolic-optimization.
TOP1RM is coming back
Hello again, tell me if I should keep my remarks/questions for myself or gather them in order to avoid spamming your repository ! Else I may reopen this issue whenever I can't understand a line I will need (as I said before, I am studying the code, but will only work on the parts that I need).
Today, I think there might be an error in subroutines.py
in the function jit_check_constraint_violation_descendant_with_target_tokens
. Just below is the code sample I am suspicious about:
if a_in_b(action, effector_tokens, T):
# Does action match a target token?
descendant = True
dangling = 1
elif a_in_b(action, target_tokens, T):
if descendant:
return True
I believe having well understood the mechanics of this function, but as I understand it, it should be something like that:
if a_in_b(action, effector_tokens, E):
# Does action match an effector token?
descendant = True
dangling = 1
elif a_in_b(action, target_tokens, T):
# Does action match a target token?
if descendant:
return True
And E
would be equal to effector_tokens.shape[0]
.
Last detail, in jit_check_constraint_violation_descendant_no_target_tokens
, in the first call of a_in_b
, just before if descendant:
, the commentary is Does action match a target tokens?
. Is it because, in the context of calling this function, targets and effectors are the same?
Please accept my apologies if I am wrong.
Best regards, TOP1RM
from deep-symbolic-optimization.
Related Issues (20)
- create primitive set mapping name clash HOT 2
- Deap varying with constraints HOT 4
- Methods for Running DSO HOT 4
- Normalization for input variables to domain (0,1) HOT 1
- Normalization for input variables to domain (0,1) HOT 1
- Different Learned Equation with Different Numpy Array Shape HOT 4
- Doubts about output HOT 1
- Ratio of training set to testing set HOT 1
- training iteration N, current best R : 0.9 HOT 1
- Trouble Installing, sample virtual environment config? HOT 7
- How to install configuration and generate an interactive platform? HOT 1
- Defining custom gaussian function HOT 3
- Ignoring errors... HOT 1
- adjusting best R or custom best R HOT 1
- how to run dso multiple times in a loop HOT 2
- How can parallel computing improve speed in a single-task scenario? HOT 1
- Installation error HOT 3
- about putting constraints HOT 2
- [Feature Request] Is it possiable to specify assertion on the expression to generate?
- The gp meld method in sklearn interface
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deep-symbolic-optimization.