Skip to content

Conversation

@JackDunnNZ
Copy link
Contributor

I found that I was getting different results for the same problem with the same RNG across different Julia versions (even after accounting for the RNG changes in Julia 1.5).

The differences seem to show up when there are multiple features with the same best split position, but because of differences between the Julia versions, the actual purity values are slightly different in the last digits, e.g. 9.893954468378139 vs 9.893954468378137, and this causes different features to be chosen on each version.

This change simply adds a small tolerance to the purity check, which ensures that changes in the last digits won't affect which feature is selected as best.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 87.787% when pulling 485231b on JackDunnNZ:master into 579062f on bensadeghi:master.

@bensadeghi bensadeghi merged commit f8b3668 into JuliaAI:master Jun 6, 2020
@bensadeghi
Copy link
Member

Wow, good catch!!
Thanks for the PR

JackDunnNZ added a commit to JackDunnNZ/DecisionTree.jl that referenced this pull request Jun 8, 2020
bensadeghi added a commit that referenced this pull request Jun 10, 2020
Fix #119 to work regardless of data scaling
giopaglia pushed a commit to giopaglia/ModalDecisionTrees.jl that referenced this pull request Nov 27, 2022
Add tolerance for best_purity checks
giopaglia pushed a commit to giopaglia/ModalDecisionTrees.jl that referenced this pull request Nov 27, 2022
giopaglia pushed a commit to giopaglia/ModalDecisionTrees.jl that referenced this pull request Nov 27, 2022
Fix JuliaAI#119 to work regardless of data scaling
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