TreeliteJNI

class TreeliteJNI

Treelite prediction runtime JNI functions

Author

Hyunsu Cho

Methods

TreeliteDMatrixCreateFromCSRWithFloat32In

public static native int TreeliteDMatrixCreateFromCSRWithFloat32In(float[] data, int[] col_ind, long[] row_ptr, long num_row, long num_col, long[] out)

TreeliteDMatrixCreateFromCSRWithFloat64In

public static native int TreeliteDMatrixCreateFromCSRWithFloat64In(double[] data, int[] col_ind, long[] row_ptr, long num_row, long num_col, long[] out)

TreeliteDMatrixCreateFromMatWithFloat32In

public static native int TreeliteDMatrixCreateFromMatWithFloat32In(float[] data, long num_row, long num_col, float missing_value, long[] out)

TreeliteDMatrixCreateFromMatWithFloat64In

public static native int TreeliteDMatrixCreateFromMatWithFloat64In(double[] data, long num_row, long num_col, double missing_value, long[] out)

TreeliteDMatrixFree

public static native int TreeliteDMatrixFree(long handle)

TreeliteDMatrixGetDimension

public static native int TreeliteDMatrixGetDimension(long handle, long[] out_num_row, long[] out_num_col, long[] out_nelem)

TreeliteGetLastError

public static native String TreeliteGetLastError()

TreelitePredictorFree

public static native int TreelitePredictorFree(long handle)

TreelitePredictorLoad

public static native int TreelitePredictorLoad(String library_path, int num_worker_thread, long[] out)

TreelitePredictorPredictBatchWithFloat32Out

public static native int TreelitePredictorPredictBatchWithFloat32Out(long handle, long batch, boolean verbose, boolean pred_margin, float[] out_result, long[] out_result_size)

TreelitePredictorPredictBatchWithFloat64Out

public static native int TreelitePredictorPredictBatchWithFloat64Out(long handle, long batch, boolean verbose, boolean pred_margin, double[] out_result, long[] out_result_size)

TreelitePredictorPredictBatchWithUInt32Out

public static native int TreelitePredictorPredictBatchWithUInt32Out(long handle, long batch, boolean verbose, boolean pred_margin, int[] out_result, long[] out_result_size)

TreelitePredictorQueryGlobalBias

public static native int TreelitePredictorQueryGlobalBias(long handle, float[] out)

TreelitePredictorQueryLeafOutputType

public static native int TreelitePredictorQueryLeafOutputType(long handle, String[] out)

TreelitePredictorQueryNumClass

public static native int TreelitePredictorQueryNumClass(long handle, long[] out)

TreelitePredictorQueryNumFeature

public static native int TreelitePredictorQueryNumFeature(long handle, long[] out)

TreelitePredictorQueryPredTransform

public static native int TreelitePredictorQueryPredTransform(long handle, String[] out)

TreelitePredictorQueryResultSize

public static native int TreelitePredictorQueryResultSize(long handle, long batch, long[] out)

TreelitePredictorQuerySigmoidAlpha

public static native int TreelitePredictorQuerySigmoidAlpha(long handle, float[] out)

TreelitePredictorQueryThresholdType

public static native int TreelitePredictorQueryThresholdType(long handle, String[] out)

checkCall

static void checkCall(int ret)

Check the return code of the JNI call.

Throws