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

Use double-precision to store split thresholds #55

Merged
merged 1 commit into from
Oct 9, 2018

Conversation

hcho3
Copy link
Collaborator

@hcho3 hcho3 commented Oct 9, 2018

One of the model builder tests failed because scikit-learn uses double-precision floating-point to store split points, whereas Treelite was using single-precision. This proved to be a problem because the threshold 4.7999999523 was changed to 4.8000001907 when it was cast to single-precision.

Fix: Use double-precision to store split thresholds.

@codecov-io
Copy link

codecov-io commented Oct 9, 2018

Codecov Report

Merging #55 into master will increase coverage by 0.42%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #55      +/-   ##
============================================
+ Coverage     87.31%   87.73%   +0.42%     
  Complexity       35       35              
============================================
  Files            76       76              
  Lines          5225     5233       +8     
  Branches         21       21              
============================================
+ Hits           4562     4591      +29     
+ Misses          642      621      -21     
  Partials         21       21
Impacted Files Coverage Δ Complexity Δ
python/treelite/frontend.py 74.9% <ø> (ø) 0 <0> (ø) ⬇️
src/c_api/c_api.cc 85.14% <ø> (ø) 0 <0> (ø) ⬇️
include/treelite/base.h 50% <ø> (ø) 0 <0> (ø) ⬇️
tests/python/test_model_builder.py 100% <100%> (ø) 0 <0> (ø) ⬇️
src/frontend/protobuf.cc 90.74% <100%> (+9.72%) 0 <0> (ø) ⬇️
include/treelite/common.h 83.2% <0%> (ø) 0% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c9023e7...b7972fb. Read the comment docs.

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.

None yet

2 participants