|
void | XGBoostVersion (int *major, int *minor, int *patch) |
| Return the version of the XGBoost library being currently used. More...
|
|
int | XGBuildInfo (char const **out) |
| Get compile information of shared library. More...
|
|
const char * | XGBGetLastError () |
| get string message of the last error More...
|
|
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 More...
|
|
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. More...
|
|
int | XGBGetGlobalConfig (char const **out_config) |
| Get current global configuration (collection of parameters that apply globally). More...
|
|
These functions are used to obtain general information about XGBoost including version, build info and current global configuration.
◆ BoosterHandle
◆ DMatrixHandle
◆ XGBGetGlobalConfig()
int XGBGetGlobalConfig |
( |
char const ** |
out_config | ) |
|
Get current global configuration (collection of parameters that apply globally).
- Parameters
-
out_config | pointer to received returned global configuration, represented as a JSON string. |
- Returns
- 0 for success, -1 for failure
◆ XGBGetLastError()
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
- Returns
- const char* error information
◆ XGBoostVersion()
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.
- Parameters
-
major | Store the major version number |
minor | Store the minor version number |
patch | Store the patch (revision) number |
◆ XGBRegisterLogCallback()
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
- Returns
- 0 for success, -1 for failure
◆ XGBSetGlobalConfig()
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.
- Parameters
-
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. |
- Returns
- 0 for success, -1 for failure
◆ XGBuildInfo()
int XGBuildInfo |
( |
char const ** |
out | ) |
|
Get compile information of shared library.
- Parameters
-
out | string encoded JSON object containing build flags and dependency version. |
- Returns
- 0 for success, -1 for failure