pub unsafe extern "C" fn LGBM_BoosterPredictForMatSingleRowFastInit(
handle: BoosterHandle,
predict_type: c_int,
start_iteration: c_int,
num_iteration: c_int,
data_type: c_int,
ncol: i32,
parameter: *const c_char,
out_fastConfig: *mut FastConfigHandle,
) -> c_intExpand description
Initialize and return a FastConfigHandle for use with LGBM_BoosterPredictForMatSingleRowFast.
Release the FastConfig by passing its handle to LGBM_FastConfigFree when no longer needed.
§Arguments
handle- Booster handlepredict_type- What should be predicted
C_API_PREDICT_NORMAL: normal prediction, with transform (if needed);C_API_PREDICT_RAW_SCORE: raw score;C_API_PREDICT_LEAF_INDEX: leaf index;C_API_PREDICT_CONTRIB: feature contributions (SHAP values)
start_iteration- Start index of the iteration to predictnum_iteration- Number of iterations for prediction, <= 0 means no limitdata_type- Type ofdatapointer, can beC_API_DTYPE_FLOAT32orC_API_DTYPE_FLOAT64ncol- Number of columnsparameter- Other parameters for prediction, e.g. early stopping for predictionout_fastConfig(direction out) - FastConfig object with which you can callLGBM_BoosterPredictForMatSingleRowFast
§Returns
0 when it succeeds, -1 when failure happens