From 9e3b878943ad4b5f84d274f9c54f9b021ed46ea3 Mon Sep 17 00:00:00 2001 From: hetong Date: Sat, 6 Sep 2014 23:20:11 -0700 Subject: [PATCH] refine style with max.depth --- R-package/R/xgb.cv.R | 4 ++-- R-package/R/xgb.train.R | 4 ++-- R-package/R/xgboost.R | 2 +- R-package/man/xgb.cv.Rd | 4 ++-- R-package/man/xgb.train.Rd | 4 ++-- R-package/man/xgboost.Rd | 2 +- R-package/vignettes/xgboost.Rnw | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/R-package/R/xgb.cv.R b/R-package/R/xgb.cv.R index 91bb4f7e2..f56d0294e 100644 --- a/R-package/R/xgb.cv.R +++ b/R-package/R/xgb.cv.R @@ -10,7 +10,7 @@ #' \item \code{binary:logistic} logistic regression for classification #' } #' \item \code{eta} step size of each boosting step -#' \item \code{max_depth} maximum depth of the tree +#' \item \code{max.depth} maximum depth of the tree #' \item \code{nthread} number of thread used in training, if not set, all threads are used #' } #' @@ -50,7 +50,7 @@ #' data(agaricus.train, package='xgboost') #' dtrain <- xgb.DMatrix(agaricus.train$data, label = agaricus.train$label) #' history <- xgb.cv(data = dtrain, nround=3, nfold = 5, metrics=list("rmse","auc"), -#' "max_depth"=3, "eta"=1, "objective"="binary:logistic") +#' "max.depth"=3, "eta"=1, "objective"="binary:logistic") #' @export #' xgb.cv <- function(params=list(), data, nrounds, nfold, label = NULL, diff --git a/R-package/R/xgb.train.R b/R-package/R/xgb.train.R index 3ad722c19..06c39d76c 100644 --- a/R-package/R/xgb.train.R +++ b/R-package/R/xgb.train.R @@ -10,7 +10,7 @@ #' \item \code{binary:logistic} logistic regression for classification #' } #' \item \code{eta} step size of each boosting step -#' \item \code{max_depth} maximum depth of the tree +#' \item \code{max.depth} maximum depth of the tree #' \item \code{nthread} number of thread used in training, if not set, all threads are used #' } #' @@ -50,7 +50,7 @@ #' dtrain <- xgb.DMatrix(agaricus.train$data, label = agaricus.train$label) #' dtest <- dtrain #' watchlist <- list(eval = dtest, train = dtrain) -#' param <- list(max_depth = 2, eta = 1, silent = 1) +#' param <- list(max.depth = 2, eta = 1, silent = 1) #' logregobj <- function(preds, dtrain) { #' labels <- getinfo(dtrain, "label") #' preds <- 1/(1 + exp(-preds)) diff --git a/R-package/R/xgboost.R b/R-package/R/xgboost.R index 1995d964b..7859eb0c1 100644 --- a/R-package/R/xgboost.R +++ b/R-package/R/xgboost.R @@ -14,7 +14,7 @@ #' \item \code{binary:logistic} logistic regression for classification #' } #' \item \code{eta} step size of each boosting step -#' \item \code{max_depth} maximum depth of the tree +#' \item \code{max.depth} maximum depth of the tree #' \item \code{nthread} number of thread used in training, if not set, all threads are used #' } #' diff --git a/R-package/man/xgb.cv.Rd b/R-package/man/xgb.cv.Rd index bfb172e53..050d8c4f8 100644 --- a/R-package/man/xgb.cv.Rd +++ b/R-package/man/xgb.cv.Rd @@ -15,7 +15,7 @@ xgb.cv(params = list(), data, nrounds, nfold, label = NULL, showsd = TRUE, \item \code{binary:logistic} logistic regression for classification } \item \code{eta} step size of each boosting step - \item \code{max_depth} maximum depth of the tree + \item \code{max.depth} maximum depth of the tree \item \code{nthread} number of thread used in training, if not set, all threads are used } @@ -67,6 +67,6 @@ This function only accepts an \code{xgb.DMatrix} object as the input. data(agaricus.train, package='xgboost') dtrain <- xgb.DMatrix(agaricus.train$data, label = agaricus.train$label) history <- xgb.cv(data = dtrain, nround=3, nfold = 5, metrics=list("rmse","auc"), - "max_depth"=3, "eta"=1, "objective"="binary:logistic") + "max.depth"=3, "eta"=1, "objective"="binary:logistic") } diff --git a/R-package/man/xgb.train.Rd b/R-package/man/xgb.train.Rd index 8c248fbf6..a05e2eeb9 100644 --- a/R-package/man/xgb.train.Rd +++ b/R-package/man/xgb.train.Rd @@ -15,7 +15,7 @@ xgb.train(params = list(), data, nrounds, watchlist = list(), obj = NULL, \item \code{binary:logistic} logistic regression for classification } \item \code{eta} step size of each boosting step - \item \code{max_depth} maximum depth of the tree + \item \code{max.depth} maximum depth of the tree \item \code{nthread} number of thread used in training, if not set, all threads are used } @@ -62,7 +62,7 @@ data(agaricus.train, package='xgboost') dtrain <- xgb.DMatrix(agaricus.train$data, label = agaricus.train$label) dtest <- dtrain watchlist <- list(eval = dtest, train = dtrain) -param <- list(max_depth = 2, eta = 1, silent = 1) +param <- list(max.depth = 2, eta = 1, silent = 1) logregobj <- function(preds, dtrain) { labels <- getinfo(dtrain, "label") preds <- 1/(1 + exp(-preds)) diff --git a/R-package/man/xgboost.Rd b/R-package/man/xgboost.Rd index 407ee3ffd..d5abe927d 100644 --- a/R-package/man/xgboost.Rd +++ b/R-package/man/xgboost.Rd @@ -20,7 +20,7 @@ xgboost(data = NULL, label = NULL, params = list(), nrounds, \item \code{binary:logistic} logistic regression for classification } \item \code{eta} step size of each boosting step - \item \code{max_depth} maximum depth of the tree + \item \code{max.depth} maximum depth of the tree \item \code{nthread} number of thread used in training, if not set, all threads are used } diff --git a/R-package/vignettes/xgboost.Rnw b/R-package/vignettes/xgboost.Rnw index d34a1e08c..2857a1869 100644 --- a/R-package/vignettes/xgboost.Rnw +++ b/R-package/vignettes/xgboost.Rnw @@ -162,7 +162,7 @@ evalerror <- function(preds, dtrain) { dtest <- xgb.DMatrix(test$data, label = test$label) watchlist <- list(eval = dtest, train = dtrain) -param <- list(max_depth = 2, eta = 1, silent = 1) +param <- list(max.depth = 2, eta = 1, silent = 1) bst <- xgb.train(param, dtrain, nround = 2, watchlist, logregobj, evalerror) @