pub unsafe extern "C" fn LGBM_BoosterPredictForFile(
handle: BoosterHandle,
data_filename: *const c_char,
data_has_header: c_int,
predict_type: c_int,
start_iteration: c_int,
num_iteration: c_int,
parameter: *const c_char,
result_filename: *const c_char,
) -> c_intExpand description
Make prediction for file.
§Arguments
handle- Handle of boosterdata_filename- Filename of file with datadata_has_header- Whether file has header or notpredict_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 limitparameter- Other parameters for prediction, e.g. early stopping for predictionresult_filename- Filename of result file in which predictions will be written
§Returns
0 when succeed, -1 when failure happens