-
Notifications
You must be signed in to change notification settings - Fork 62
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
Resolving Issue # 23 Unary ops #25
base: master
Are you sure you want to change the base?
Conversation
Cool. Thank you Richard.
…On 2/9/21 8:07 PM, Richard wrote:
Sorry, my local repo. got confused. I have now placed the modified files in the correct locations.
You can view, comment on, or merge this pull request online at:
#25
-- Commit Summary --
* Resolves Issue #23: "On unary operators"
* Delete __init__.py
* Delete data_ABS.csv
* Delete operators_PLAY.csv
* Delete operators_REGRESS.csv
* Delete operators_list.txt
* Delete base_class.py
* Add files via upload
* Add files via upload
-- File Changes --
M RELEASE_NOTES.txt (4)
M karoo-gp.py (8)
M karoo_gp/__init__.py (2)
M karoo_gp/base_class.py (79)
A karoo_gp/files/templates/data_ABS.csv (12)
M karoo_gp/files/templates/operators_list.txt (93)
-- Patch Links --
https://github.com/kstaats/karoo_gp/pull/25.patch
https://github.com/kstaats/karoo_gp/pull/25.diff
|
I also promised a look at the .pdf documentation.
|
Thank you. I have not had a chance to update the docs, fully, since the
revised code structure.
…On 2/10/21 12:58 PM, Richard wrote:
I also promised a look at the .pdf documentation.
1. p. 4 "$ python karoo_gp..." everywhere --> "$ python karoo-gp..."
2. p. 4 Furthermore, there is no file named "karoo_gp_main.py", or anything similar.
3. p. 10 Diagram at bottom shows arity 3. This case is known to fail, although it is still in the code.
4. p. 11 Paragraph 3 through end of page needs to be reworked, removing all discussion about binarizing unary operators.
5. p. 14 "population_final.csv" --> "population_f.csv"
|
Since these changes touch a lot of code, I am holding further pull requests pending merge of this #25. |
Richard,
Since these changes touch a lot of code, I am holding further pull requests pending merge of this #25.
I fully understand and appreciate all you have done to improve Karoo. I
look forward to diving into your changes, as soon as I am able.
In the mean time, let's discuss this a bit more, off-line.
Cheers,
kai
|
@@ -1048,16 +1051,17 @@ def fx_eval_label(self, tree, node_id): | |||
node_id = int(node_id) | |||
|
|||
if tree[8, node_id] == '0': # arity of 0 for the pattern '[term]' | |||
return '(' + tree[6, node_id] + ')' # 'node_label' (function or terminal) | |||
return tree[6, node_id] # 'node_label' (function or terminal) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return tree[6, node_id] # 'node_label' (function or terminal) | |
return tree[6, node_id] # 'node_label' (function or terminal) # rll 20210201 |
Thank you for all of the tags! Let's just make certain all of your changes have the same.
Richard, Per our prior communications, I truly appreciate all the work and effort you have put into Karoo GP. I cloned your branch and ran it through a number of tests, to determine if the overall behavior had in any way changed, as compared to the prior version. While you were successful in enabling the unary operators (cos, sin, log, etc.), some of the basic, built-in tests can no longer be solved, or best case, are solved with far more complicated, evolved solutions. This is due to the introduction of potentially several new layers of () which both change the result of the mathematical expression, and keep it from being simplified to something human readable. An example is to use the Matching function set to a min/max depth of 5: ORIGINAL for a perfect score of 10. MODIFIED where not a single tree was able to find the correct solution, over multiple runs. With the Iris Dataset Classification, there is a known, correct solution (see the PDF included in the files/Iris_Dataset PDF). Also, the NaN and -INF solutions, which are much appreciated may also lead to changed results (in at least one of the tests I ran). Let's take this conversation off-thread and see if we can't find a mutually beneficial solution. |
I have updated and uploaded the revised User Guide. Yes, a number of references to old versions of the code, prior to the prep for PIP install (coming soon!). Thanks Richard! |
In fx_data_params_write, mis-initialization of fitness_best prevented Classify and Match from working.
Sorry, my local repo. got confused. I have now placed the modified files in the correct locations.