LGBM_BoosterPredictForMatSingleRowFast

Function LGBM_BoosterPredictForMatSingleRowFast 

Source
pub unsafe extern "C" fn LGBM_BoosterPredictForMatSingleRowFast(
    fastConfig_handle: FastConfigHandle,
    data: *const c_void,
    out_len: *mut i64,
    out_result: *mut f64,
) -> c_int
Expand description

Faster variant of LGBM_BoosterPredictForMatSingleRow.

Score a single row after setup with LGBM_BoosterPredictForMatSingleRowFastInit.

By removing the setup steps from this call extra optimizations can be made like initializing the config only once, instead of once per call.

Note: Setting up the number of threads is only done once at LGBM_BoosterPredictForMatSingleRowFastInit instead of at each prediction. If you use a different number of threads in other calls, you need to start the setup process over, or that number of threads will be used for these calls as well.

§Arguments

  • fastConfig_handle - FastConfig object handle returned by LGBM_BoosterPredictForMatSingleRowFastInit
  • data - Single-row array data (no other way than row-major form).
  • out_len (direction out) - Length of output result
  • out_result (direction out) - Pointer to array with predictions

§Returns

0 when it succeeds, -1 when failure happens