|
void | XGBoostVersion (int *major, int *minor, int *patch) |
| 返回当前使用的 XGBoost 库的版本。更多...
|
|
int | XGBuildInfo (char const **out) |
| 获取共享库的编译信息。更多...
|
|
const char * | XGBGetLastError () |
| 获取最后一个错误的字符串消息 更多...
|
|
int | XGBRegisterLogCallback (void(*callback)(const char *)) |
| 注册 LOG(INFO) 消息的回调函数 - 有用的非错误消息。注意:此函数可由多个线程调用。回调函数将在注册它的线程上运行 更多...
|
|
int | XGBSetGlobalConfig (char const *config) |
| 设置全局配置(全局应用的参数集合)。此函数接受表示要配置的全局范围参数的键值对列表。键值对列表作为 JSON 字符串传入。更多...
|
|
int | XGBGetGlobalConfig (char const **out_config) |
| 获取当前全局配置(全局应用的参数集合)。更多...
|
|
int | XGDMatrixCreateFromFile (const char *fname, int silent, DMatrixHandle *out) |
| 加载数据矩阵 更多...
|
|
int | XGDMatrixCreateFromURI (char const *config, DMatrixHandle *out) |
| 加载数据矩阵 更多...
|
|
int | XGDMatrixCreateFromCSREx (const size_t *indptr, const unsigned *indices, const float *data, size_t nindptr, size_t nelem, size_t num_col, DMatrixHandle *out) |
| 从 CSR 格式创建矩阵内容 更多...
|
|
int | XGDMatrixCreateFromColumnar (char const *data, char const *config, DMatrixHandle *out) |
| 从列式数据创建 DMatrix。(表格)更多...
|
|
int | XGDMatrixCreateFromCSR (char const *indptr, char const *indices, char const *data, bst_ulong ncol, char const *config, DMatrixHandle *out) |
| 从 CSR 矩阵创建 DMatrix。更多...
|
|
int | XGDMatrixCreateFromDense (char const *data, char const *config, DMatrixHandle *out) |
| 从密集数组创建 DMatrix。更多...
|
|
int | XGDMatrixCreateFromCSC (char const *indptr, char const *indices, char const *data, bst_ulong nrow, char const *config, DMatrixHandle *out) |
| 从 CSC 矩阵创建 DMatrix。更多...
|
|
int | XGDMatrixCreateFromCSCEx (const size_t *col_ptr, const unsigned *indices, const float *data, size_t nindptr, size_t nelem, size_t num_row, DMatrixHandle *out) |
| 从 CSC 格式创建矩阵内容 更多...
|
|
int | XGDMatrixCreateFromMat (const float *data, bst_ulong nrow, bst_ulong ncol, float missing, DMatrixHandle *out) |
| 从密集矩阵创建矩阵内容 更多...
|
|
int | XGDMatrixCreateFromMat_omp (const float *data, bst_ulong nrow, bst_ulong ncol, float missing, DMatrixHandle *out, int nthread) |
| 从密集矩阵创建矩阵内容 更多...
|
|
int | XGDMatrixCreateFromCudaColumnar (char const *data, char const *config, DMatrixHandle *out) |
| 从 CUDA 列式格式创建 DMatrix。(cuDF)更多...
|
|
int | XGDMatrixCreateFromCudaArrayInterface (char const *data, char const *config, DMatrixHandle *out) |
| 从 CUDA 数组创建 DMatrix。更多...
|
|
int | XGDMatrixCreateFromDataIter (DataIterHandle data_handle, XGBCallbackDataIterNext *callback, const char *cache_info, float missing, DMatrixHandle *out) |
| 从数据迭代器创建 DMatrix。更多...
|
|
int | XGProxyDMatrixCreate (DMatrixHandle *out) |
| 创建用于设置数据的 DMatrix 代理,可通过 XGDMatrixFree 释放。更多...
|
|
int | XGDMatrixCreateFromCallback (DataIterHandle iter, DMatrixHandle proxy, DataIterResetCallback *reset, XGDMatrixCallbackNext *next, char const *config, DMatrixHandle *out) |
| 使用数据迭代器创建外部内存 DMatrix。更多...
|
|
int | XGQuantileDMatrixCreateFromCallback (DataIterHandle iter, DMatrixHandle proxy, DataIterHandle ref, DataIterResetCallback *reset, XGDMatrixCallbackNext *next, char const *config, DMatrixHandle *out) |
| 使用数据迭代器创建 Quantile DMatrix。更多...
|
|
int | XGExtMemQuantileDMatrixCreateFromCallback (DataIterHandle iter, DMatrixHandle proxy, DataIterHandle ref, DataIterResetCallback *reset, XGDMatrixCallbackNext *next, char const *config, DMatrixHandle *out) |
| 创建由外部内存支持的 Quantile DMatrix。更多...
|
|
int | XGProxyDMatrixSetDataCudaArrayInterface (DMatrixHandle handle, const char *data) |
| 在 DMatrix 代理上设置数据。更多...
|
|
int | XGProxyDMatrixSetDataColumnar (DMatrixHandle handle, char const *data) |
| 在 DMatrix 代理上设置列式(表格)数据。更多...
|
|
int | XGProxyDMatrixSetDataCudaColumnar (DMatrixHandle handle, const char *data) |
| 在 DMatrix 代理上设置基于 CUDA 的列式(表格)数据。更多...
|
|
int | XGProxyDMatrixSetDataDense (DMatrixHandle handle, char const *data) |
| 在 DMatrix 代理上设置数据。更多...
|
|
int | XGProxyDMatrixSetDataCSR (DMatrixHandle handle, char const *indptr, char const *indices, char const *data, bst_ulong ncol) |
| 在 DMatrix 代理上设置数据。更多...
|
|
int | XGDMatrixSliceDMatrix (DMatrixHandle handle, const int *idxset, bst_ulong len, DMatrixHandle *out) |
| 从现有矩阵的切片内容创建新的 DMatrix 更多...
|
|
int | XGDMatrixSliceDMatrixEx (DMatrixHandle handle, const int *idxset, bst_ulong len, DMatrixHandle *out, int allow_groups) |
| 从现有矩阵的切片内容创建新的 DMatrix 更多...
|
|
int | XGDMatrixFree (DMatrixHandle handle) |
| 释放数据矩阵中的空间 更多...
|
|
int | XGDMatrixSaveBinary (DMatrixHandle handle, const char *fname, int silent) |
| 将 DMatrix 对象保存到文件。不支持 QuantileDMatrix 和外部内存 DMatrix。更多...
|
|
int | XGDMatrixSetInfoFromInterface (DMatrixHandle handle, char const *field, char const *data) |
| 将数组接口中的内容设置为 info 中的内容。更多...
|
|
int | XGDMatrixSetFloatInfo (DMatrixHandle handle, const char *field, const float *array, bst_ulong len) |
| 设置 float 向量到 info 中的内容 更多...
|
|
int | XGDMatrixSetUIntInfo (DMatrixHandle handle, const char *field, const unsigned *array, bst_ulong len) |
|
int | XGDMatrixSetStrFeatureInfo (DMatrixHandle handle, const char *field, const char **features, const bst_ulong size) |
| 设置所有特征的字符串编码信息。更多...
|
|
int | XGDMatrixGetStrFeatureInfo (DMatrixHandle handle, const char *field, bst_ulong *size, const char ***out_features) |
| 获取所有特征的字符串编码信息。更多...
|
|
int | XGDMatrixSetDenseInfo (DMatrixHandle handle, const char *field, void const *data, bst_ulong size, int type) |
|
int | XGDMatrixGetFloatInfo (const DMatrixHandle handle, const char *field, bst_ulong *out_len, const float **out_dptr) |
| 从矩阵获取 float 信息向量。更多...
|
|
int | XGDMatrixGetUIntInfo (const DMatrixHandle handle, const char *field, bst_ulong *out_len, const unsigned **out_dptr) |
| 从矩阵获取 uint32 信息向量 更多...
|
|
int | XGDMatrixNumRow (DMatrixHandle handle, bst_ulong *out) |
| 获取行数。更多...
|
|
int | XGDMatrixNumCol (DMatrixHandle handle, bst_ulong *out) |
| 获取列数 更多...
|
|
int | XGDMatrixNumNonMissing (DMatrixHandle handle, bst_ulong *out) |
| 从 DMatrix 获取有效值数量。更多...
|
|
int | XGDMatrixDataSplitMode (DMatrixHandle handle, bst_ulong *out) |
| 从 DMatrix 获取数据分割模式。更多...
|
|
int | XGDMatrixGetDataAsCSR (DMatrixHandle const handle, char const *config, bst_ulong *out_indptr, unsigned *out_indices, float *out_data) |
| 将 DMatrix 中的预测变量获取为 CSR 矩阵用于测试。如果这是量化 DMatrix,则返回量化值。更多...
|
|
int | XGDMatrixGetQuantileCut (DMatrixHandle const handle, char const *config, char const **out_indptr, char const **out_data) |
| 导出用于训练基于直方图的模型(如 hist 和 approx )的分位数分割点。对于模型压缩很有用。更多...
|
|
int | XGBoosterCreate (const DMatrixHandle dmats[], bst_ulong len, BoosterHandle *out) |
| 创建 XGBoost 学习器 (booster) 更多...
|
|
int | XGBoosterFree (BoosterHandle handle) |
| 删除 booster。更多...
|
|
int | XGBoosterReset (BoosterHandle handle) |
| 重置 booster 对象以释放用于训练的数据缓存。更多...
|
|
int | XGBoosterSlice (BoosterHandle handle, int begin_layer, int end_layer, int step, BoosterHandle *out) |
| 使用 boosting 索引切片模型。切片 m:n 表示采用 boosting 回合 m, (m+1), (m+2), ..., (n-1) 期间拟合的所有树。更多...
|
|
int | XGBoosterBoostedRounds (BoosterHandle handle, int *out) |
| 从梯度 booster 获取 boosted 回合数。当 process_type 为 update 时,由于删除树,此数字可能会减少。更多...
|
|
int | XGBoosterSetParam (BoosterHandle handle, const char *name, const char *value) |
| 设置参数 更多...
|
|
int | XGBoosterGetNumFeature (BoosterHandle handle, bst_ulong *out) |
| 获取特征数 更多...
|
|
int | XGBoosterUpdateOneIter (BoosterHandle handle, int iter, DMatrixHandle dtrain) |
| 使用 dtrain 更新模型一个回合 更多...
|
|
int | XGBoosterBoostOneIter (BoosterHandle handle, DMatrixHandle dtrain, float *grad, float *hess, bst_ulong len) |
|
int | XGBoosterTrainOneIter (BoosterHandle handle, DMatrixHandle dtrain, int iter, char const *grad, char const *hess) |
| 使用梯度和 Hessian 更新模型。这用于自定义目标函数的训练。更多...
|
|
int | XGBoosterEvalOneIter (BoosterHandle handle, int iter, DMatrixHandle dmats[], const char *evnames[], bst_ulong len, const char **out_result) |
| 获取 xgboost 的评估统计信息 更多...
|
|
int | XGBoosterPredict (BoosterHandle handle, DMatrixHandle dmat, int option_mask, unsigned ntree_limit, int training, bst_ulong *out_len, const float **out_result) |
| 基于 dmat 进行预测(已弃用,请改用 XGBoosterPredictFromDMatrix)更多...
|
|
int | XGBoosterPredictFromDMatrix (BoosterHandle handle, DMatrixHandle dmat, char const *config, bst_ulong const **out_shape, bst_ulong *out_dim, float const **out_result) |
| 从 DMatrix 进行预测,替换 XGBoosterPredict。更多...
|
|
int | XGBoosterPredictFromDense (BoosterHandle handle, char const *values, char const *config, DMatrixHandle m, bst_ulong const **out_shape, bst_ulong *out_dim, const float **out_result) |
| 从 CPU 密集矩阵进行就地预测。更多...
|
|
int | XGBoosterPredictFromColumnar (BoosterHandle handle, char const *values, char const *config, DMatrixHandle m, bst_ulong const **out_shape, bst_ulong *out_dim, const float **out_result) |
| 从 CPU 列式数据进行就地预测。(表格)更多...
|
|
int | XGBoosterPredictFromCSR (BoosterHandle handle, char const *indptr, char const *indices, char const *values, bst_ulong ncol, char const *config, DMatrixHandle m, bst_ulong const **out_shape, bst_ulong *out_dim, const float **out_result) |
| 从 CPU CSR 矩阵进行就地预测。更多...
|
|
int | XGBoosterPredictFromCudaArray (BoosterHandle handle, char const *values, char const *config, DMatrixHandle proxy, bst_ulong const **out_shape, bst_ulong *out_dim, const float **out_result) |
| 从 CUDA 密集矩阵进行就地预测(Python 中的 cupy)。更多...
|
|
int | XGBoosterPredictFromCudaColumnar (BoosterHandle handle, char const *data, char const *config, DMatrixHandle proxy, bst_ulong const **out_shape, bst_ulong *out_dim, const float **out_result) |
| 从 CUDA 密集数据框进行就地预测(Python 中的 cuDF)。更多...
|
|
int | XGBoosterLoadModel (BoosterHandle handle, const char *fname) |
| 从现有文件加载模型。更多...
|
|
int | XGBoosterSaveModel (BoosterHandle handle, const char *fname) |
| 将模型保存到现有文件。更多...
|
|
int | XGBoosterLoadModelFromBuffer (BoosterHandle handle, const void *buf, bst_ulong len) |
| 从内存缓冲区加载模型 更多...
|
|
int | XGBoosterSaveModelToBuffer (BoosterHandle handle, char const *config, bst_ulong *out_len, char const **out_dptr) |
| 将模型保存为原始字节,返回数组头部。用户必须在下一次 xgboost 调用之前复制结果。更多...
|
|
int | XGBoosterSerializeToBuffer (BoosterHandle handle, bst_ulong *out_len, const char **out_dptr) |
| 基于内存快照的序列化方法。将所有状态保存到缓冲区。更多...
|
|
int | XGBoosterUnserializeFromBuffer (BoosterHandle handle, const void *buf, bst_ulong len) |
| 基于内存快照的序列化方法。加载从 XGBoosterSerializeToBuffer 返回的缓冲区。更多...
|
|
int | XGBoosterSaveJsonConfig (BoosterHandle handle, bst_ulong *out_len, char const **out_str) |
| 将 XGBoost 的内部配置保存为 JSON 文档。目前支持是实验性的,函数签名将来可能会更改,恕不另行通知。更多...
|
|
int | XGBoosterLoadJsonConfig (BoosterHandle handle, char const *config) |
| 从 JSON 文档加载 XGBoost 的内部配置。目前支持是实验性的,函数签名将来可能会更改,恕不另行通知。更多...
|
|
int | XGBoosterDumpModel (BoosterHandle handle, const char *fmap, int with_stats, bst_ulong *out_len, const char ***out_dump_array) |
| 导出模型,返回表示模型导出内容的字符串数组 更多...
|
|
int | XGBoosterDumpModelEx (BoosterHandle handle, const char *fmap, int with_stats, const char *format, bst_ulong *out_len, const char ***out_dump_array) |
| 导出模型,返回表示模型导出内容的字符串数组 更多...
|
|
int | XGBoosterDumpModelWithFeatures (BoosterHandle handle, int fnum, const char **fname, const char **ftype, int with_stats, bst_ulong *out_len, const char ***out_models) |
| 导出模型,返回表示模型导出内容的字符串数组 更多...
|
|
int | XGBoosterDumpModelExWithFeatures (BoosterHandle handle, int fnum, const char **fname, const char **ftype, int with_stats, const char *format, bst_ulong *out_len, const char ***out_models) |
| 导出模型,返回表示模型导出内容的字符串数组 更多...
|
|
int | XGBoosterGetAttr (BoosterHandle handle, const char *key, const char **out, int *success) |
| 从 Booster 获取字符串属性。更多...
|
|
int | XGBoosterSetAttr (BoosterHandle handle, const char *key, const char *value) |
| 设置或删除字符串属性。更多...
|
|
int | XGBoosterGetAttrNames (BoosterHandle handle, bst_ulong *out_len, const char ***out) |
| 从 Booster 获取所有属性的名称。更多...
|
|
int | XGBoosterSetStrFeatureInfo (BoosterHandle handle, const char *field, const char **features, const bst_ulong size) |
| 在 Booster 中设置字符串编码的特征信息,类似于 DMatrix 中的特征信息。更多...
|
|
int | XGBoosterGetStrFeatureInfo (BoosterHandle handle, const char *field, bst_ulong *len, const char ***out_features) |
| 从 Booster 获取字符串编码的特征信息,类似于 DMatrix 中的特征信息。更多...
|
|
int | XGBoosterFeatureScore (BoosterHandle handle, const char *config, bst_ulong *out_n_features, char const ***out_features, bst_ulong *out_dim, bst_ulong const **out_shape, float const **out_scores) |
| 计算树模型的特征得分。当用于线性模型时,只定义了 weight 重要性类型,并且对于多分类模型,输出分数是形状为 [n_features, n_classes] 的行主序矩阵。对于树模型,out_n_feature 始终等于 out_n_scores,并且重要性类型有多种定义。更多...
|
|
int | XGTrackerCreate (char const *config, TrackerHandle *handle) |
| 创建一个新的跟踪器。更多...
|
|
int | XGTrackerWorkerArgs (TrackerHandle handle, char const **args) |
| 获取运行 worker 所需的参数。应在调用 XGTrackerRun() 之后调用此函数。更多...
|
|
int | XGTrackerRun (TrackerHandle handle, char const *config) |
| 启动跟踪器。跟踪器在后台运行,此函数在跟踪器启动后立即返回。更多...
|
|
int | XGTrackerWaitFor (TrackerHandle handle, char const *config) |
| 等待跟踪器完成,应在调用 XGTrackerRun() 之后调用此函数。此函数将阻塞直到跟踪器任务完成或达到超时。更多...
|
|
int | XGTrackerFree (TrackerHandle handle) |
| 释放跟踪器实例。应在调用 XGTrackerWaitFor() 之后调用此函数。如果未正确等待跟踪器,此函数将关闭与跟踪器的所有连接,可能导致未定义行为。更多...
|
|
int | XGCommunicatorInit (char const *config) |
| 初始化集合通信器。更多...
|
|
int | XGCommunicatorFinalize (void) |
| 终止集合通信器。更多...
|
|
int | XGCommunicatorGetRank (void) |
| 获取当前进程的 rank。更多...
|
|
int | XGCommunicatorGetWorldSize (void) |
| 获取进程总数。更多...
|
|
int | XGCommunicatorIsDistributed (void) |
| 获取通信器是否是分布式的。更多...
|
|
int | XGCommunicatorPrint (char const *message) |
| 向跟踪器打印消息。更多...
|
|
int | XGCommunicatorGetProcessorName (const char **name_str) |
| 获取处理器的名称。更多...
|
|
int | XGCommunicatorBroadcast (void *send_receive_buffer, size_t size, int root) |
| 从 root 向所有其他进程广播内存区域。此函数不是线程安全的。更多...
|
|
int | XGCommunicatorAllreduce (void *send_receive_buffer, size_t count, int data_type, int op) |
| 执行就地 allreduce。此函数不是线程安全的。更多...
|
|