Medial Code Documentation
|
XGBoost C API reference. More...
Typedefs | |
typedef void * | DMatrixHandle |
handle to DMatrix | |
typedef void * | BoosterHandle |
handle to Booster | |
Functions | |
XGB_DLL void | XGBoostVersion (int *major, int *minor, int *patch) |
Return the version of the XGBoost library being currently used. | |
XGB_DLL int | XGBuildInfo (char const **out) |
Get compile information of shared library. | |
XGB_DLL const char * | XGBGetLastError () |
get string message of the last error | |
XGB_DLL int | XGBRegisterLogCallback (void(*callback)(const char *)) |
register callback function for LOG(INFO) messages – helpful messages that are not errors. Note: this function can be called by multiple threads. The callback function will run on the thread that registered it | |
XGB_DLL int | XGBSetGlobalConfig (char const *config) |
Set global configuration (collection of parameters that apply globally). This function accepts the list of key-value pairs representing the global-scope parameters to be configured. The list of key-value pairs are passed in as a JSON string. | |
XGB_DLL int | XGBGetGlobalConfig (char const **out_config) |
Get current global configuration (collection of parameters that apply globally). | |
XGBoost C API reference.
For the official document page see: XGBoost C Package.
These functions are used to obtain general information about XGBoost including version, build info and current global configuration.
XGB_DLL int XGBGetGlobalConfig | ( | char const ** | out_config | ) |
Get current global configuration (collection of parameters that apply globally).
out_config | pointer to received returned global configuration, represented as a JSON string. |
XGB_DLL const char * XGBGetLastError | ( | ) |
get string message of the last error
all function in this file will return 0 when success and -1 when an error occurred, XGBGetLastError can be called to retrieve the error
this function is thread safe and can be called by different thread
XGB_DLL void XGBoostVersion | ( | int * | major, |
int * | minor, | ||
int * | patch | ||
) |
Return the version of the XGBoost library being currently used.
The output variable is only written if it's not NULL.
major | Store the major version number |
minor | Store the minor version number |
patch | Store the patch (revision) number |
XGB_DLL int XGBRegisterLogCallback | ( | void(*)(const char *) | callback | ) |
register callback function for LOG(INFO) messages – helpful messages that are not errors. Note: this function can be called by multiple threads. The callback function will run on the thread that registered it
XGB_DLL int XGBSetGlobalConfig | ( | char const * | config | ) |
Set global configuration (collection of parameters that apply globally). This function accepts the list of key-value pairs representing the global-scope parameters to be configured. The list of key-value pairs are passed in as a JSON string.
config | a JSON string representing the list of key-value pairs. The JSON object shall be flat: no value can be a JSON object or an array. |
XGB_DLL int XGBuildInfo | ( | char const ** | out | ) |
Get compile information of shared library.
out | string encoded JSON object containing build flags and dependency version. |