Add C document to sphinx, fix arrow. (#8300)

- Group C API.
- Add C API sphinx doc.
- Consistent use of `OptionalArg` and the parameter name `config`.
- Remove call to deprecated functions in demo.
- Fix some formatting errors.
- Add links to c examples in the document (only visible with doxygen pages)
- Fix arrow.
This commit is contained in:
Jiaming Yuan
2022-10-05 09:52:15 +08:00
committed by GitHub
parent b2bbf49015
commit 97c3a80a34
17 changed files with 458 additions and 297 deletions

View File

@@ -139,8 +139,8 @@ void TrainModel(DMatrix Xy) {
Booster booster;
DMatrix cache[] = {Xy};
safe_xgboost(XGBoosterCreate(cache, 1, &booster));
/* Use approx for external memory training. */
safe_xgboost(XGBoosterSetParam(booster, "tree_method", "approx"));
/* Use approx or hist for external memory training. */
safe_xgboost(XGBoosterSetParam(booster, "tree_method", "hist"));
safe_xgboost(XGBoosterSetParam(booster, "objective", "reg:squarederror"));
/* Start training. */