Practical overview
When it fits
Use it when a Java application needs online prediction from a supported XGBoost model and its model format, objective and desired output match the library's documented scope.
Who it is for
- Java developers adding XGBoost model inference to server-side applications.
- Teams that need prediction, margin or tree-leaf outputs from supported XGBoost models.
- Developers evaluating a documented Apache Spark integration module.
Documented uses
- Load a supported XGBoost model into a Java application.
- Convert dense arrays or sparse maps into feature vectors for prediction.
- Retrieve probability or class predictions, margins, or per-tree leaf indexes.
Requirements & limits
- The README lists gblinear, gbtree and dart model formats and a defined set of classification, regression and ranking objectives.
- Dense-array input includes an option to treat zero values as missing; sparse input is represented by a map.
- Dependency examples use Bintray or JCenter repository references, which teams may need to assess in their build environment.
- The README points to an Apache Spark module but does not detail its implementation or setup.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Add the predictor dependency and prepare a Java prediction
Configure a Java project with the documented dependency and use a model file with a dense or sparse feature vector.
Before you start
- A Java project using Maven, Gradle or sbt.
- A supported XGBoost model file.
- Feature values representable as a dense double array or sparse map.
Steps
Add biz.k11i:xgboost-predictor version 0.3.0 using one of the README's Maven, Gradle or sbt examples.
Load the XGBoost model file into a Predictor.
Create an FVec from a dense array or sparse map; the dense-array API can treat zero values as missing.
Call predict for the documented probability or classification output, or predictLeaf for tree leaf indexes.
Expected outcome
A Java application can request documented prediction results or per-tree leaf indexes from the loaded model.
Guide limitations
- The README lists supported model formats as gblinear, gbtree and dart, and specifies supported objectives and prediction APIs.
- The dependency examples refer to Bintray or JCenter repositories; the guide does not establish their present availability.
- The README does not provide detailed setup steps for the Spark integration module.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 November 2026
- Original website title
- komiya-atsushi/xgboost-predictor-java · Official homepage title · retained in its source language

