Skip to content
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

Make TreeAdapters for Pythagorean trees more general #1651

Merged
merged 2 commits into from
Oct 14, 2016

Conversation

janezd
Copy link
Contributor

@janezd janezd commented Oct 9, 2016

TreeAdapters are great and potentially useful elsewhere, too.

When implementing another adapter, I guess I found two (cosmetic) slips:

  • get_instances_in_nodes accepts instances of TreeNode, which is specific Pythagorean trees,
  • ROOT_PARENT is defined as -1, which is specific to SKL trees. A value of None would be more pythonic. Besides, the code in pythagorasviewer.py compares the node with -1 instead of with ROOT_PARENT. Finally, the constant is defined in the base TreeAdapter as well as in the derived SklTreeAdapter.

@pavlin-policar, can you take a look at these two cosmetic changes? Did I overlook any place that needs to be changed w.r.t this?

@codecov-io
Copy link

codecov-io commented Oct 9, 2016

Current coverage is 88.73% (diff: 100%)

Merging #1651 into master will not change coverage

@@             master      #1651   diff @@
==========================================
  Files            78         78          
  Lines          8150       8150          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           7232       7232          
  Misses          918        918          
  Partials          0          0          

Sunburst

Powered by Codecov. Last update a33b7c8...9a77c60

@pavlin-policar
Copy link
Collaborator

pavlin-policar commented Oct 11, 2016

This is great, but this breaks the regression tree tooltips (which were apparently wrong and overlooked in the first place).

I've opened #1660 to fix this problem, so these two should be merged together.

@janezd
Copy link
Contributor Author

janezd commented Oct 13, 2016

Apologies for letting you wait; I had 11 hours of lecturing this week.

I've spotted the problem with regression trees, but attributed it to some other changes I've made in another PR I'm preparing. I've merged #1660. You can now merge this one if you think it's OK.

@pavlin-policar
Copy link
Collaborator

No problem. It should be okay to merge now. I've looked it over again and found no apparent problems.

@lanzagar lanzagar merged commit 259685a into biolab:master Oct 14, 2016
@janezd janezd deleted the pythagora-agnostic branch October 14, 2016 18:21
@astaric astaric modified the milestone: 3.3.9 Nov 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants