-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Do you have the plan to support Java like xgboost4j? #909
Comments
I need it too for one of the highly important Microsoft customer... |
the spark version will release on mmlspark (https://github.com/Azure/mmlspark ) soon. |
ping @rmhasan |
Exporting LightGBM to PMML, and then scoring using a Java PMML engine should count as a viable option in the meantime. I've updated my JPMML-LightGBM exporter library to be fully compatible with the latest LightGBM v2.0.7 (including the handling of categorical/binary features and missing values). Better yet, it provides some custom functionality such as limiting the number of trees (similar to the Tree compaction involves 1) expanding LightGBM-style binary splits into PMML-style multi-way splits, 2) eliminating half terminal nodes (aka leafs) and 3) eliminating redundant tree splitting predicates. It leads to >50% reduction in PMML file size. |
@vladimir-vilinski @liulhdarks @vruusmann I've checked in the code to generate SWIG Java wrappers to LightGBM repo mkdir build ; cd build The jar file is also available in maven central: I also have a PR open to add LightGBM to MMLSpark, a package for apache spark distributed data processing framework: If you have any suggestions for how to improve the SWIG wrappers or have any general questions please let me know. |
Thanks @imatiach-msft so much! |
@guolinke , let's remaining this open for further discussion. |
@chivee @guolinke - @drdarshan suggested that the Java bindings could be improved by using SWIG typemaps. This would be more customized code but it would remove the need for developers to deal with SWIG pointer types. I think this is an improvement that we could add in the future for developers who use the Java bindings directly (and not our spark-based learners). |
@liulhdarks @imatiach-msft |
@spkaplan yes, that is the package that I am maintaining. However, the java interface still needs to be improved more, as I mentioned above. I am open to suggestions from the community. Right now the autogenerated wrappers are mainly only used in mmlspark in scala code, but anyone can use the package. |
@imatiach-msft Thank you for the quick reply! I had accidentally overlooked your previous comment regarding the jar available in maven central. Thank you for pointing that out! |
Closed in favor of being in #2302. We decided to keep all feature requests in one place. Welcome to contribute this feature! Please re-open this issue (or post a comment if you are not a topic starter) if you are actively working on implementing this feature. |
Do you have the plan to support Java like xgboost4j?
The text was updated successfully, but these errors were encountered: