From cdfa78a3b95f7f28a22bdf39c9511fa3b61f213f Mon Sep 17 00:00:00 2001 From: pommedeterresautee Date: Sun, 15 Mar 2015 23:51:26 +0100 Subject: [PATCH] small changes in doc --- R-package/R/getinfo.xgb.DMatrix.R | 13 ++++++++++++- R-package/R/setinfo.xgb.DMatrix.R | 9 +++++++++ R-package/R/xgboost.R | 2 +- R-package/man/getinfo.Rd | 12 +++++++++++- R-package/man/setinfo.Rd | 10 ++++++++++ R-package/man/xgboost.Rd | 2 +- 6 files changed, 44 insertions(+), 4 deletions(-) diff --git a/R-package/R/getinfo.xgb.DMatrix.R b/R-package/R/getinfo.xgb.DMatrix.R index 6e291fe62..518cf10c5 100644 --- a/R-package/R/getinfo.xgb.DMatrix.R +++ b/R-package/R/getinfo.xgb.DMatrix.R @@ -4,6 +4,15 @@ setClass('xgb.DMatrix') #' #' Get information of an xgb.DMatrix object #' +#' The information can be one of the following: +#' +#' \itemize{ +#' \item \code{label} +#' \item \code{weight} +#' \item \code{base_margin} +#' \item \code{nrow} +#' } +#' #' @examples #' data(agaricus.train, package='xgboost') #' train <- agaricus.train @@ -19,7 +28,9 @@ getinfo <- function(object, ...){ UseMethod("getinfo") } -#' @param object Object of class "xgb.DMatrix" + + +#' @param object Object of class \code{xgb.DMatrix} #' @param name the name of the field to get #' @param ... other parameters #' @rdname getinfo diff --git a/R-package/R/setinfo.xgb.DMatrix.R b/R-package/R/setinfo.xgb.DMatrix.R index 579d9fbcf..3ed2fbecc 100644 --- a/R-package/R/setinfo.xgb.DMatrix.R +++ b/R-package/R/setinfo.xgb.DMatrix.R @@ -2,6 +2,15 @@ #' #' Set information of an xgb.DMatrix object #' +#' It can be one of the following: +#' +#' \itemize{ +#' \item \code{label} +#' \item \code{weight} +#' \item \code{base_margin} +#' \item \code{group} +#' } +#' #' @examples #' data(agaricus.train, package='xgboost') #' train <- agaricus.train diff --git a/R-package/R/xgboost.R b/R-package/R/xgboost.R index f20b260c9..1007cb91d 100644 --- a/R-package/R/xgboost.R +++ b/R-package/R/xgboost.R @@ -45,7 +45,7 @@ #' train <- agaricus.train #' test <- agaricus.test #' bst <- xgboost(data = train$data, label = train$label, max.depth = 2, -#' eta = 1, nthread = 2, nround = 2,objective = "binary:logistic") +#' eta = 1, nthread = 2, nround = 2, objective = "binary:logistic") #' pred <- predict(bst, test$data) #' #' @export diff --git a/R-package/man/getinfo.Rd b/R-package/man/getinfo.Rd index 37e0ad0be..4f5fd71bc 100644 --- a/R-package/man/getinfo.Rd +++ b/R-package/man/getinfo.Rd @@ -11,7 +11,7 @@ getinfo(object, ...) \S4method{getinfo}{xgb.DMatrix}(object, name) } \arguments{ -\item{object}{Object of class "xgb.DMatrix"} +\item{object}{Object of class \code{xgb.DMatrix}} \item{...}{other parameters} @@ -20,6 +20,16 @@ getinfo(object, ...) \description{ Get information of an xgb.DMatrix object } +\details{ +The information can be one of the following: + +\itemize{ + \item \code{label} + \item \code{weight} + \item \code{base_margin} + \item \code{nrow} +} +} \examples{ data(agaricus.train, package='xgboost') train <- agaricus.train diff --git a/R-package/man/setinfo.Rd b/R-package/man/setinfo.Rd index 4ed262b46..334a67b27 100644 --- a/R-package/man/setinfo.Rd +++ b/R-package/man/setinfo.Rd @@ -22,6 +22,16 @@ setinfo(object, ...) \description{ Set information of an xgb.DMatrix object } +\details{ +It can be one of the following: + +\itemize{ + \item \code{label} + \item \code{weight} + \item \code{base_margin} + \item \code{group} +} +} \examples{ data(agaricus.train, package='xgboost') train <- agaricus.train diff --git a/R-package/man/xgboost.Rd b/R-package/man/xgboost.Rd index cb9da74f7..a0ec42a9b 100644 --- a/R-package/man/xgboost.Rd +++ b/R-package/man/xgboost.Rd @@ -59,7 +59,7 @@ data(agaricus.test, package='xgboost') train <- agaricus.train test <- agaricus.test bst <- xgboost(data = train$data, label = train$label, max.depth = 2, - eta = 1, nthread = 2, nround = 2,objective = "binary:logistic") + eta = 1, nthread = 2, nround = 2, objective = "binary:logistic") pred <- predict(bst, test$data) }