Skip to content

Commit

Permalink
Trailing white spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mayer79 committed Aug 2, 2024
1 parent f5249ad commit 3b69935
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 20 deletions.
19 changes: 9 additions & 10 deletions R-package/R/callbacks.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' Constructor for defining the structure of callback functions that can be executed
#' at different stages of model training (before / after training, before / after each boosting
#' iteration).
#'
#'
#' @details
#' Arguments that will be passed to the supplied functions are as follows:
#' - env The same environment that is passed under argument `env`.
Expand Down Expand Up @@ -151,9 +151,8 @@
#' under the name supplied for parameter `cb_name` imn the case of [xgb.train()]; or a part
#' of the named elements in the result of [xgb.cv()].
#' @return An `xgb.Callback` object, which can be passed to [xgb.train()] or [xgb.cv()].

#' @seealso
#' Built-in callbacks:
#'
#' @seealso Built-in callbacks:
#' - [xgb.cb.print.evaluation]
#' - [xgb.cb.evaluation.log]
#' - [xgb.cb.reset.parameters]
Expand Down Expand Up @@ -450,13 +449,13 @@ xgb.cb.print.evaluation <- function(period = 1, showsd = TRUE) {
}

#' Callback for logging the evaluation history
#'
#'
#' @details This callback creates a table with per-iteration evaluation metrics (see parameters
#' `evals` and `feval` in [xgb.train()]).
#'
#'
#' Note: in the column names of the final data.table, the dash '-' character is replaced with
#' the underscore '_' in order to make the column names more like regular R identifiers.
#'
#'
#' @return An `xgb.Callback` object, which can be passed to [xgb.train()] or [xgb.cv()].
#' @seealso [xgb.cb.print.evaluation]
#' @export
Expand Down Expand Up @@ -595,7 +594,7 @@ xgb.cb.reset.parameters <- function(new_params) {
#' - `best_score` the evaluation score at the best iteration
#' - `best_iteration` at which boosting iteration the best score has occurred
#' (0-based index for interoperability of binary models)
#'
#'
#' The same values are also stored as R attributes as a result of the callback, plus an additional
#' attribute `stopped_by_max_rounds` which indicates whether an early stopping by the `stopping_rounds`
#' condition occurred. Note that the `best_iteration` that is stored under R attributes will follow
Expand All @@ -605,7 +604,7 @@ xgb.cb.reset.parameters <- function(new_params) {
#' At least one dataset is required in `evals` for early stopping to work.
#'
#' @param stopping_rounds The number of rounds with no improvement in
#' the evaluation metric in order to stop the training.
#' the evaluation metric in order to stop the training.
#' @param maximize Whether to maximize the evaluation metric.
#' @param metric_name The name of an evaluation column to use as a criteria for early
#' stopping. If not set, the last column would be used.
Expand Down Expand Up @@ -911,7 +910,7 @@ xgb.cb.cv.predict <- function(save_models = FALSE, outputmargin = FALSE) {
}

#' Callback for collecting coefficients history of a gblinear booster
#'
#'
#' @details
#' To keep things fast and simple, gblinear booster does not internally store the history of linear
#' model coefficients at each boosting iteration. This callback provides a workaround for storing
Expand Down
2 changes: 1 addition & 1 deletion R-package/R/xgb.Booster.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ xgb.get.handle <- function(object) {
#' Note that, if `newdata` is an `xgb.DMatrix` object, this argument will
#' be ignored as it needs to be added to the DMatrix instead (e.g. by passing it as
#' an argument in its constructor, or by calling [setinfo.xgb.DMatrix()].
#' @param validate_features When `TRUE`, validate that the Booster's and newdata's
#' @param validate_features When `TRUE`, validate that the Booster's and newdata's
#' feature_names match (only applicable when both `object` and `newdata` have feature names).
#'
#' If the column names differ and `newdata` is not an `xgb.DMatrix`, will try to reorder
Expand Down
2 changes: 1 addition & 1 deletion R-package/R/xgb.create.features.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' May improve the learning by adding new features to the training data based on the
#' decision trees from a previously learned model.
#'
#'
#' @details
#' This is the function inspired from the paragraph 3.1 of the paper:
#'
Expand Down
2 changes: 1 addition & 1 deletion R-package/R/xgb.importance.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Feature importance
#'
#' Creates a `data.table` of feature importances.
#'
#'
#' @details
#' This function works for both linear and tree models.
#'
Expand Down
2 changes: 1 addition & 1 deletion R-package/R/xgb.load.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#'
#' train <- agaricus.train
#' test <- agaricus.test
#'
#'
#' bst <- xgb.train(
#' data = xgb.DMatrix(train$data, label = train$label),
#' max_depth = 2,
Expand Down
2 changes: 1 addition & 1 deletion R-package/R/xgb.plot.importance.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' Represents previously calculated feature importance as a bar graph.
#' - `xgb.plot.importance()` uses base R graphics, while
#' - `xgb.ggplot.importance()` uses "ggplot".
#'
#'
#' @details
#' The graph represents each feature as a horizontal bar of length proportional to the
#' importance of a feature. Features are sorted by decreasing importance.
Expand Down
2 changes: 1 addition & 1 deletion R-package/R/xgb.plot.tree.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Plot boosted trees
#'
#' Read a tree model text dump and plot the model.
#'
#'
#' @details
#' When using `style="xgboost"`, the content of each node is visualized as follows:
#' - For non-terminal nodes, it will display the split condition (number or name if
Expand Down
2 changes: 1 addition & 1 deletion R-package/R/xgb.save.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' default to UBJ.
#'
#' @details
#'
#'
#' This methods allows to save a model in an XGBoost-internal binary or text format which is universal
#' among the various xgboost interfaces. In R, the saved model file could be read later
#' using either the [xgb.load()] function or the `xgb_model` parameter of [xgb.train()].
Expand Down
2 changes: 1 addition & 1 deletion R-package/man/xgb.cb.cv.predict.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.cb.gblinear.history.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.gblinear.history.Rd

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

0 comments on commit 3b69935

Please sign in to comment.