TreeliteJNI

class TreeliteJNI

Treelite prediction runtime JNI functions

Author

Hyunsu Cho

Methods

TreeliteAssembleDenseBatch

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

TreeliteAssembleSparseBatch

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

TreeliteBatchGetDimension

public static final native int TreeliteBatchGetDimension(long handle, boolean batch_sparse, long[] out_num_row, long[] out_num_col)

TreeliteDeleteDenseBatch

public static final native int TreeliteDeleteDenseBatch(long handle, float[] data)

TreeliteDeleteSparseBatch

public static final native int TreeliteDeleteSparseBatch(long handle, float[] data, int[] col_ind, long[] row_ptr)

TreeliteGetLastError

public static final native String TreeliteGetLastError()

TreelitePredictorFree

public static final native int TreelitePredictorFree(long handle)

TreelitePredictorLoad

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

TreelitePredictorPredictBatch

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

TreelitePredictorPredictInst

public static final native int TreelitePredictorPredictInst(long handle, byte[] inst, boolean pred_margin, float[] out_result, long[] out_result_size)

TreelitePredictorQueryGlobalBias

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

TreelitePredictorQueryNumFeature

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

TreelitePredictorQueryNumOutputGroup

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

TreelitePredictorQueryPredTransform

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

TreelitePredictorQueryResultSize

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

TreelitePredictorQueryResultSizeSingleInst

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

TreelitePredictorQuerySigmoidAlpha

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

checkCall

static void checkCall(int ret)

Check the return code of the JNI call.

Throws