improvement for reducing warnings

This commit is contained in:
hetong
2014-09-06 21:28:42 -07:00
parent d214013681
commit 43a781f59b
3 changed files with 9 additions and 6 deletions

View File

@@ -33,9 +33,14 @@
#' Number of threads can also be manually specified via "nthread" parameter
#'
#' @examples
#' data(iris)
#' bst <- xgboost(as.matrix(iris[,1:4]),as.numeric(iris[,5]=='setosa'), nrounds = 2)
#' pred <- predict(bst, as.matrix(iris[,1:4]))
#' data(agaricus.train, package='xgboost')
#' data(agaricus.test, package='xgboost')
#' train <- agaricus.train
#' test <- agaricus.test
#' bst <- xgboost(data = train$data, label = train$label, max.depth = 2,
#' eta = 1, nround = 2,objective = "binary:logistic")
#' pred <- predict(bst, test$data)
#'
#' @export
#'
xgboost <- function(data = NULL, label = NULL, params = list(), nrounds,