Skip to content

Round digits in print_tree - #173

Merged
ablaom merged 6 commits into
JuliaAI:devfrom
rikhuijzer:rh/tree-digits
Jun 20, 2022
Merged

ablaom merged 6 commits into
JuliaAI:devfrom
rikhuijzer:rh/tree-digits

Conversation

@rikhuijzer

Copy link
Copy Markdown
Member

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, Threshold -28.16
L-> Feature 2, Threshold -161.04
    L-> 5 : 842/3650
    R-> 7 : 2493/10555
R-> Feature 7, Threshold 108.14
    L-> 2 : 2434/15287
    R-> 8 : 1227/3508

@codecov-commenter

codecov-commenter commented Jun 15, 2022 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 65.00000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.18%. Comparing base (63cb26a) to head (3ba1651).
⚠️ Report is 96 commits behind head on dev.

Files with missing lines Patch % Lines
src/scikitlearnAPI.jl 0.00% 4 Missing ⚠️
src/DecisionTree.jl 81.25% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #173      +/-   ##
==========================================
- Coverage   89.51%   89.18%   -0.33%     
==========================================
  Files          10       10              
  Lines         992      999       +7     
==========================================
+ Hits          888      891       +3     
- Misses        104      108       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ablaom ablaom left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This totally makes sense. My only suggestion would be to use sigdigits instead of digits in round (and name of kwarg) because features can come with very different scales

@rikhuijzer

Copy link
Copy Markdown
Member Author

This totally makes sense. My only suggestion would be to use sigdigits instead of digits in round (and name of kwarg) because features can come with very different scales

I never knew of the existence of sigdigits. Thanks; I've updated it

Comment thread src/DecisionTree.jl Outdated
@ablaom

ablaom commented Jun 16, 2022

Copy link
Copy Markdown
Member

Please rebase your PR to address the conflicts. Part of these will be because I modified the print_tree doc-string before merging #172, which I did to improve the string further and resolve a separate conflict.

rikhuijzer and others added 2 commits June 17, 2022 19:10
Co-authored-by: Anthony Blaom, PhD <anthony.blaom@gmail.com>
@rikhuijzer

rikhuijzer commented Jun 17, 2022 •

Copy link
Copy Markdown
Member Author

Don't merge yet. I should add a test first; also for #172

@rikhuijzer

Copy link
Copy Markdown
Member Author

I've added a test in 3ba1651 and added a first argument io::IO to the print_tree signature. I figured that it would probably be best to implement that at some point anyway because it is a Julia convention, so I thought why not now.

If that feature is not acceptable, we can revert 3ba1651 and merge that. The tests do not add super much unfortunately. It's hard to test the text.

@ablaom ablaom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks!

@ablaom
ablaom merged commit a3398bf into JuliaAI:dev Jun 20, 2022
This was referenced Jun 21, 2022
@rikhuijzer rikhuijzer mentioned this pull request Jul 5, 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