|
| void | XGBoostVersion (int *major, int *minor, int *patch) |
| | Return the version of the XGBoost library. More...
|
| |
| int | XGBuildInfo (char const **out) |
| | Get compile information of the shared XGBoost library. More...
|
| |
| const char * | XGBGetLastError () |
| | Get the 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. 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
◆ CategoriesHandle
Handle to the categories container.
- Since
- 3.2.0
◆ 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 when success, -1 when failure happens
◆ XGBGetLastError()
| const char* XGBGetLastError |
( |
| ) |
|
Get the string message of the last error.
Most functions in XGBoost returns 0 when success and non-zero when an error occurred. In the case of error, XGBGetLastError can be used to retrieve the error message
This function is thread safe.
- Returns
- The error message from the last error.
◆ XGBoostVersion()
| void XGBoostVersion |
( |
int * |
major, |
|
|
int * |
minor, |
|
|
int * |
patch |
|
) |
| |
Return the version of the XGBoost library.
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 when success, -1 when failure happens
◆ 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 when success, -1 when failure happens
◆ XGBuildInfo()
| int XGBuildInfo |
( |
char const ** |
out | ) |
|
Get compile information of the shared XGBoost library.
- Parameters
-
| out | string encoded JSON object containing build flags and dependency versions. |
- Returns
- 0 when success, -1 when failure happens