Skip to content

Commit 032bcc5

Browse files
authored
[backport][R] Fix method name. (dmlc#9577) (dmlc#9592)
1 parent ace7713 commit 032bcc5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

R-package/R/callbacks.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ cb.print.evaluation <- function(period = 1, showsd = TRUE) {
7070
i == env$begin_iteration ||
7171
i == env$end_iteration) {
7272
stdev <- if (showsd) env$bst_evaluation_err else NULL
73-
msg <- format.eval.string(i, env$bst_evaluation, stdev)
73+
msg <- .format_eval_string(i, env$bst_evaluation, stdev)
7474
cat(msg, '\n')
7575
}
7676
}
@@ -380,7 +380,9 @@ cb.early.stop <- function(stopping_rounds, maximize = FALSE,
380380
if ((maximize && score > best_score) ||
381381
(!maximize && score < best_score)) {
382382

383-
best_msg <<- format.eval.string(i, env$bst_evaluation, env$bst_evaluation_err)
383+
best_msg <<- .format_eval_string(
384+
i, env$bst_evaluation, env$bst_evaluation_err
385+
)
384386
best_score <<- score
385387
best_iteration <<- i
386388
best_ntreelimit <<- best_iteration * env$num_parallel_tree
@@ -754,7 +756,7 @@ xgb.gblinear.history <- function(model, class_index = NULL) {
754756
#
755757

756758
# Format the evaluation metric string
757-
format.eval.string <- function(iter, eval_res, eval_err = NULL) {
759+
.format_eval_string <- function(iter, eval_res, eval_err = NULL) {
758760
if (length(eval_res) == 0)
759761
stop('no evaluation results')
760762
enames <- names(eval_res)

0 commit comments

Comments
 (0)