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

Enabling xgboost-predictor for XGBoost version 1.0 and above #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ajay-shriwastava
Copy link

As noted in the XGBoost Documentation for saving and loading of data Since XGBoost 1.0.0, XGBoost team has introduced ...

support of using JSON for saving/loading XGBoost models and related hyper-parameters for training, aiming to replace the old binary internal format with an open format that can be easily reused.

The 0.3.x version of xgboost-predictor-java is based on old binary format. The JSON format introduces a breaking change for xgboost-predictor-java-0.3.8. The proposed version 1.0.0 has been modified to read XGBoost model in JSON format. Till the 0.3.x, reading of the model in binary format was closely integrated with implementation therefore major refactoring of code was required. The current version is proposed to be 1.0.0 to reflect the refactoring and sync it with XGBoost 1.0.0 when the JSON format was introduced.

Library jsonschema2pojo is used to generate Java POJO objects and the POJO's are also checked in to provide consistent behavior with model versions. The JSON model can be read in Java POJO's using jackson databind. Despite major refactoring for reading model in JSON format, much of the original design is preserved for all calculation purposes.

…y adding pom.xml and modified gitignore

2.  Added New dependencies, Version Upgrades for Java and XGBoost model dependencies.
2.1. Added dependency for logback and Jafana
2.2. Updated existing test to use JUnit 5
2.3. Added XgBoost Models for Pima Indian Diabetes Prediction for XGBoost version 0.9 and 1.4
2.4. Added a test to make prediction on 0.9 model
2.5  Added jackson-databind as a dependency

3. Refactored package structure by moving package tree to tree.reg to make space for tree.json package.

4. Adding POJO's generated by jsonschema2pojo. These Pojos will be the Java object equivalent of Xgboost Json file. Successfully tested reading the model JSON in to POJO's

5.  Enabled XG-Boost Prediction with latest model
5.1 Added XgbTree Implementation and JSonReader
5.2 Modified code to work with latest Tree Implementation
5.3 Added Test for Xgb Predictor with JSON verified with prediction on 1.4 model
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.

1 participant