LGBM_BoosterPredictForMatSingleRowFastInit

Function LGBM_BoosterPredictForMatSingleRowFastInit 

Source
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_int
Expand 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 handle
  • predict_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 predict
  • num_iteration - Number of iterations for prediction, <= 0 means no limit
  • data_type - Type of data pointer, can be C_API_DTYPE_FLOAT32 or C_API_DTYPE_FLOAT64
  • ncol - Number of columns
  • parameter - Other parameters for prediction, e.g. early stopping for prediction
  • out_fastConfig (direction out) - FastConfig object with which you can call LGBM_BoosterPredictForMatSingleRowFast

§Returns

0 when it succeeds, -1 when failure happens