Skip to content

Commit

Permalink
Merge branch 'remove_ellipsis' into clear_test_warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cortes committed Dec 8, 2024
2 parents fd31213 + 826c898 commit 59857f8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions R-package/R/xgb.create.features.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
#' dtrain <- with(agaricus.train, xgb.DMatrix(data, label = label, nthread = 2))
#' dtest <- with(agaricus.test, xgb.DMatrix(data, label = label, nthread = 2))
#'
#' param <- list(max_depth = 2, eta = 1, objective = 'binary:logistic')
#' param <- list(max_depth = 2, eta = 1, objective = 'binary:logistic', nthread = 1)
#' nrounds = 4
#'
#' bst <- xgb.train(params = param, data = dtrain, nrounds = nrounds, nthread = 2)
#' bst <- xgb.train(params = param, data = dtrain, nrounds = nrounds)
#'
#' # Model accuracy without new features
#' accuracy.before <- sum((predict(bst, agaricus.test$data) >= 0.5) == agaricus.test$label) /
Expand All @@ -67,12 +67,12 @@
#'
#' # learning with new features
#' new.dtrain <- xgb.DMatrix(
#' data = new.features.train, label = agaricus.train$label, nthread = 2
#' data = new.features.train, label = agaricus.train$label
#' )
#' new.dtest <- xgb.DMatrix(
#' data = new.features.test, label = agaricus.test$label, nthread = 2
#' data = new.features.test, label = agaricus.test$label
#' )
#' bst <- xgb.train(params = param, data = new.dtrain, nrounds = nrounds, nthread = 2)
#' bst <- xgb.train(params = param, data = new.dtrain, nrounds = nrounds)
#'
#' # Model accuracy with new features
#' accuracy.after <- sum((predict(bst, new.dtest) >= 0.5) == agaricus.test$label) /
Expand Down
2 changes: 1 addition & 1 deletion R-package/R/xgb.train.R
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
#'
#' # ... or as dedicated 'objective' and 'custom_metric' parameters of xgb.train:
#' bst <- xgb.train(
#' within(param, rm(c("objective", "eval_metric"))),
#' within(param, rm("objective", "eval_metric")),
#' dtrain, nrounds = 2, evals = evals,
#' objective = logregobj, custom_metric = evalerror
#' )
Expand Down
10 changes: 5 additions & 5 deletions R-package/man/xgb.create.features.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion R-package/man/xgb.train.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 59857f8

Please sign in to comment.