Commit 0ddb3efd authored by Guolin Ke's avatar Guolin Ke
Browse files

[R-package] change ```startsWith``` to ```grepl```.

parent 2035c54b
...@@ -240,8 +240,8 @@ Booster <- R6Class( ...@@ -240,8 +240,8 @@ Booster <- R6Class(
private$eval_names <- names private$eval_names <- names
private$higher_better_inner_eval <- rep(FALSE, length(names)) private$higher_better_inner_eval <- rep(FALSE, length(names))
for (i in seq_along(names)) { for (i in seq_along(names)) {
if (startsWith(names[i], "auc") | if (names[i]) == "auc" |
startsWith(names[i], "ndcg")) { grepl("^ndcg", names[i])) {
private$higher_better_inner_eval[i] <- TRUE private$higher_better_inner_eval[i] <- TRUE
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment