[−][src]Function lightgbm_sys::LGBM_BoosterGetPredict
pub unsafe extern "C" fn LGBM_BoosterGetPredict(
handle: BoosterHandle,
data_idx: c_int,
out_len: *mut i64,
out_result: *mut f64
) -> c_int
\brief Get prediction for training data and validation data.
\note
You should pre-allocate memory for out_result
, its length is equal to num_class * num_data
.
\param handle Handle of booster
\param data_idx Index of data, 0: training data, 1: 1st validation data, 2: 2nd validation data and so on
\param[out] out_len Length of output result
\param[out] out_result Pointer to array with predictions
\return 0 when succeed, -1 when failure happens