@@ -258,8 +258,24 @@ check_args.boost_tree <- function(object) {
258258
259259# xgboost helpers --------------------------------------------------------------
260260
261- # ' Training helper for xgboost
261+ # ' Boosted trees via xgboost
262262# '
263+ # ' `xgb_train` is a wrapper for `xgboost` tree-based models
264+ # ' where all of the model arguments are in the main function.
265+ # '
266+ # ' @param x A data frame or matrix of predictors
267+ # ' @param y A vector (factor or numeric) or matrix (numeric) of outcome data.
268+ # ' @param max_depth An integer for the maximum depth of the tree.
269+ # ' @param nrounds An integer for the number of boosting iterations.
270+ # ' @param eta A numeric value between zero and one to control the learning rate.
271+ # ' @param colsample_bytree Subsampling proportion of columns.
272+ # ' @param min_child_weight A numeric value for the minimum sum of instance
273+ # ' weights needed in a child to continue to split.
274+ # ' @param gamma An number for the minimum loss reduction required to make a
275+ # ' further partition on a leaf node of the tree
276+ # ' @param subsample Subsampling proportion of rows.
277+ # ' @param ... Other options to pass to `xgb.train`.
278+ # ' @return A fitted `xgboost` object.
263279# ' @export
264280xgb_train <- function (
265281 x , y ,
@@ -403,8 +419,30 @@ xgb_by_tree <- function(tree, object, new_data, type, ...) {
403419
404420# C5.0 helpers -----------------------------------------------------------------
405421
406- # ' Training helper for C5.0
422+ # ' Boosted trees via C5.0
423+ # '
424+ # ' `C5.0_train` is a wrapper for [C50::C5.0()] tree-based models
425+ # ' where all of the model arguments are in the main function.
407426# '
427+ # ' @param x A data frame or matrix of predictors.
428+ # ' @param y A factor vector with 2 or more levels
429+ # ' @param trials An integer specifying the number of boosting
430+ # ' iterations. A value of one indicates that a single model is
431+ # ' used.
432+ # ' @param weights An optional numeric vector of case weights. Note
433+ # ' that the data used for the case weights will not be used as a
434+ # ' splitting variable in the model (see
435+ # ' \url{http://www.rulequest.com/see5-win.html#CASEWEIGHT} for
436+ # ' Quinlan's notes on case weights).
437+ # ' @param minCases An integer for the smallest number of samples
438+ # ' that must be put in at least two of the splits.
439+ # ' @param sample A value between (0, .999) that specifies the
440+ # ' random proportion of the data should be used to train the model.
441+ # ' By default, all the samples are used for model training. Samples
442+ # ' not used for training are used to evaluate the accuracy of the
443+ # ' model in the printed output.
444+ # ' @param ... Other arguments to pass.
445+ # ' @return A fitted C5.0 model.
408446# ' @export
409447C5.0_train <-
410448 function (x , y , weights = NULL , trials = 15 , minCases = 2 , sample = 0 , ... ) {
0 commit comments