pub unsafe extern "C" fn LGBM_BoosterSaveModelToString(
handle: BoosterHandle,
start_iteration: c_int,
num_iteration: c_int,
feature_importance_type: c_int,
buffer_len: i64,
out_len: *mut i64,
out_str: *mut c_char,
) -> c_intExpand description
Save model to string.
§Arguments
handle- Handle of boosterstart_iteration- Start index of the iteration that should be savednum_iteration- Index of the iteration that should be saved, <= 0 means save allfeature_importance_type- Type of feature importance, can beC_API_FEATURE_IMPORTANCE_SPLITorC_API_FEATURE_IMPORTANCE_GAINbuffer_len- String buffer length, ifbuffer_len < out_len, you should re-allocate bufferout_len(direction out) - Actual output lengthout_str(direction out) - String of model, should pre-allocate memory
§Returns
0 when succeed, -1 when failure happens