Skip to content

Replace L by < and R by #172

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

Merged
merged 2 commits into from
Jun 16, 2022
Merged

Replace L by < and R by #172

merged 2 commits into from
Jun 16, 2022

Conversation

rikhuijzer
Copy link
Member

@rikhuijzer rikhuijzer commented Jun 14, 2022

This PR is a suggestion to make the print output of print_tree easier to understand without context.

Before (dev branch)

Feature 3, Threshold -28.166052806422238
L-> Feature 2, Threshold -161.04351901384842
    L-> 5 : 842/3650
    R-> 7 : 2493/10555
R-> Feature 7, Threshold 108.1408338577021
    L-> 2 : 2434/15287
    R-> 8 : 1227/3508

After (this PR)

Feature 3 < -28.156052806422238 ?
├─ Feature 2 < -161.04351901384842 ?
   ├─ 5 : 842/3650
   └─ 7 : 2493/10555
└─ Feature 7 < 108.1408338577021 ?
   ├─ 2 : 2434/15287
   └─ 8 : 1227/3508

@ablaom
Copy link
Member

ablaom commented Jun 15, 2022

Thanks @rikhuijzer . I'm not sure you realised, but recently added was an implementation of the AbstractTrees.jl interface for decision trees and we made similar changes for that version of printing a node. See my suggestion here and the final implementation here. If we are going to change the built in print_tree, then I guess we should be consistent with that.

For more on the AbstractTrees.jl interface query the wrap doc-string and see the end of the readme.

@roland-KA Your thoughts?

@roland-KA
Copy link
Collaborator

I'm a big fan of consistency 😊 ... so I would appreciate the change suggested above by @rikhuijzer 👍. That's identical to what we did with AbstractTrees, isn't it?

@ablaom
Copy link
Member

ablaom commented Jun 16, 2022

It is now. Thanks for taking on the suggestion @rikhuijzer.

@ablaom ablaom merged commit 93e2c8b into JuliaAI:dev Jun 16, 2022
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.

3 participants