|
122 | 122 | #' printed out during the training.
|
123 | 123 | #' E.g., specifying \code{evals=list(validation1=mat1, validation2=mat2)} allows to track
|
124 | 124 | #' the performance of each round's model on mat1 and mat2.
|
125 |
| -#' @param obj customized objective function. Returns gradient and second order |
126 |
| -#' gradient with given prediction and dtrain. |
127 |
| -#' @param feval customized evaluation function. Returns |
128 |
| -#' \code{list(metric='metric-name', value='metric-value')} with given |
129 |
| -#' prediction and dtrain. |
| 125 | +#' @param obj customized objective function. Should take two arguments: the first one will be the |
| 126 | +#' current predictions (either a numeric vector or matrix depending on the number of targets / classes), |
| 127 | +#' and the second one will be the `data` DMatrix object that is used for training. |
| 128 | +#' |
| 129 | +#' It should return a list with two elements `grad` and `hess` (in that order), as either |
| 130 | +#' numeric vectors or numeric matrices depending on the number of targets / classes (same |
| 131 | +#' dimension as the predictions that are passed as first argument). |
| 132 | +#' @param feval customized evaluation function. Just like `obj`, should take two arguments, with |
| 133 | +#' the first one being the predictions and the second one the `data` DMatrix. |
| 134 | +#' |
| 135 | +#' Should return a list with two elements `metric` (name that will be displayed for this metric, |
| 136 | +#' should be a string / character), and `value` (the number that the function calculates, should |
| 137 | +#' be a numeric scalar). |
| 138 | +#' |
| 139 | +#' Note that even if passing `feval`, objectives also have an associated default metric that |
| 140 | +#' will be evaluated in addition to it. In order to disable the built-in metric, one can pass |
| 141 | +#' parameter `disable_default_eval_metric = TRUE`. |
130 | 142 | #' @param verbose If 0, xgboost will stay silent. If 1, it will print information about performance.
|
131 | 143 | #' If 2, some additional information will be printed out.
|
132 | 144 | #' Note that setting \code{verbose > 0} automatically engages the
|
|
0 commit comments