Package ml.dmlc.xgboost4j.java
Class JniUtils
java.lang.Object
ml.dmlc.xgboost4j.java.JniUtils
DJL class that has access to XGBoost JNI.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckCall(int ret) static longcreateDMatrix(Buffer buf, ai.djl.ndarray.types.Shape shape, float missing) static longcreateDMatrix(ml.dmlc.xgboost4j.java.ColumnBatch columnBatch, float missing, int nthread) static longcreateDMatrixCSR(long[] indptr, int[] indices, float[] array, float missing, int nthread) static voiddeleteDMatrix(long handle) static voiddeleteModel(long handle) static float[]inference(XgbSymbolBlock block, XgbNDArray array, int treeLimit, XgbSymbolBlock.Mode mode) static XgbSymbolBlockloadModel(XgbNDManager manager, String modelPath)
-
Method Details
-
checkCall
public static void checkCall(int ret) -
loadModel
-
createDMatrix
-
createDMatrix
public static long createDMatrix(ml.dmlc.xgboost4j.java.ColumnBatch columnBatch, float missing, int nthread) -
createDMatrixCSR
public static long createDMatrixCSR(long[] indptr, int[] indices, float[] array, float missing, int nthread) -
deleteDMatrix
public static void deleteDMatrix(long handle) -
inference
public static float[] inference(XgbSymbolBlock block, XgbNDArray array, int treeLimit, XgbSymbolBlock.Mode mode) -
deleteModel
public static void deleteModel(long handle)
-