Skip to content

Commit d0bc917

Browse files
committed
better multi_predict docs
1 parent 849ff1b commit d0bc917

File tree

4 files changed

+47
-2
lines changed

4 files changed

+47
-2
lines changed

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ S3method(multi_predict,"_earth")
77
S3method(multi_predict,"_elnet")
88
S3method(multi_predict,"_lognet")
99
S3method(multi_predict,"_multnet")
10+
S3method(multi_predict,"_train.kknn")
1011
S3method(multi_predict,"_xgb.Booster")
1112
S3method(multi_predict,default)
1213
S3method(nullmodel,default)

R/boost_tree.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ xgb_pred <- function(object, newdata, ...) {
358358

359359
#' @importFrom purrr map_df
360360
#' @export
361+
#' @rdname multi_predict
362+
#' @param trees An integer vector for the number of trees in the ensemble.
361363
multi_predict._xgb.Booster <-
362364
function(object, new_data, type = NULL, trees = NULL, ...) {
363365
if (any(names(enquos(...)) == "newdata"))
@@ -460,12 +462,14 @@ C5.0_train <-
460462
if(!is.null(weights))
461463
fit_call$weights <- quote(weights)
462464

463-
for(i in names(fit_args))
465+
for (i in names(fit_args)) {
464466
fit_call[[i]] <- fit_args[[i]]
467+
}
465468
eval_tidy(fit_call)
466469
}
467470

468471
#' @export
472+
#' @rdname multi_predict
469473
multi_predict._C5.0 <-
470474
function(object, new_data, type = NULL, trees = NULL, ...) {
471475
if (any(names(enquos(...)) == "newdata"))

R/mars.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ earth_reg_updater <- function(num, object, new_data, ...) {
205205

206206
#' @importFrom purrr map_df
207207
#' @importFrom dplyr arrange
208+
#' @rdname multi_predict
209+
#' @param num_terms An integer vector for the number of MARS terms to retain.
208210
#' @export
209211
multi_predict._earth <-
210212
function(object, new_data, type = NULL, num_terms = NULL, ...) {

man/multi_predict.Rd

Lines changed: 39 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)