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

Add all objectives currently supported by LightGBM #215

Merged
merged 4 commits into from
Oct 26, 2020

Conversation

hcho3
Copy link
Collaborator

@hcho3 hcho3 commented Oct 24, 2020

Add all objectives currently supported by LightGBM. Notably, all regression objectives now offers an option sqrt. If this option is set, then the final output is given by f(x) = sign(x) * x**2 where x is the margin score.

Closes #94
Closes #98

@codecov-io
Copy link

codecov-io commented Oct 24, 2020

Codecov Report

Merging #215 into mainline will decrease coverage by 0.03%.
The diff coverage is 66.66%.

Impacted file tree graph

@@              Coverage Diff               @@
##             mainline     #215      +/-   ##
==============================================
- Coverage       83.55%   83.52%   -0.04%     
- Complexity         44       46       +2     
==============================================
  Files              92       92              
  Lines            6664     6700      +36     
  Branches           42       50       +8     
==============================================
+ Hits             5568     5596      +28     
- Misses           1072     1079       +7     
- Partials           24       25       +1     
Impacted Files Coverage Δ Complexity Δ
src/compiler/native/typeinfo_ctypes.h 48.00% <41.66%> (-2.00%) 0.00 <0.00> (ø)
runtime/python/treelite_runtime/util.py 94.73% <71.42%> (-5.27%) 0.00 <0.00> (ø)
src/frontend/lightgbm.cc 83.73% <75.00%> (-0.56%) 0.00 <0.00> (ø)
src/compiler/native/pred_transform.h 80.88% <83.33%> (+0.23%) 0.00 <0.00> (ø)
src/compiler/pred_transform.cc 68.00% <100.00%> (+1.33%) 0.00 <0.00> (ø)
...src/main/java/ml/dmlc/treelite4j/java/DMatrix.java 69.76% <0.00%> (+13.95%) 9.00% <0.00%> (+2.00%)

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 9b42c39...dcfee05. Read the comment docs.

Copy link
Contributor

@wphicks wphicks left a comment

Choose a reason for hiding this comment

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

Looks great! Just one typo, but besides that I think we're good to go.

runtime/python/treelite_runtime/util.py Outdated Show resolved Hide resolved
Copy link
Contributor

@wphicks wphicks left a comment

Choose a reason for hiding this comment

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

LGTM!

@hcho3 hcho3 merged commit c2dc4dd into dmlc:mainline Oct 26, 2020
@hcho3
Copy link
Collaborator Author

hcho3 commented Oct 26, 2020

@wphicks Thanks for reviewing!

@hcho3 hcho3 deleted the improve_lightgbm_support branch October 26, 2020 21:39
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.

predictions results do not match original lightgbm my litghtgbm model can't get correct predict value
3 participants