small changes in doc
This commit is contained in:
parent
93a019d174
commit
cdfa78a3b9
@ -4,6 +4,15 @@ setClass('xgb.DMatrix')
|
|||||||
#'
|
#'
|
||||||
#' Get information of an xgb.DMatrix object
|
#' 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
|
#' @examples
|
||||||
#' data(agaricus.train, package='xgboost')
|
#' data(agaricus.train, package='xgboost')
|
||||||
#' train <- agaricus.train
|
#' train <- agaricus.train
|
||||||
@ -19,7 +28,9 @@ getinfo <- function(object, ...){
|
|||||||
UseMethod("getinfo")
|
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 name the name of the field to get
|
||||||
#' @param ... other parameters
|
#' @param ... other parameters
|
||||||
#' @rdname getinfo
|
#' @rdname getinfo
|
||||||
|
|||||||
@ -2,6 +2,15 @@
|
|||||||
#'
|
#'
|
||||||
#' Set information of an xgb.DMatrix object
|
#' 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
|
#' @examples
|
||||||
#' data(agaricus.train, package='xgboost')
|
#' data(agaricus.train, package='xgboost')
|
||||||
#' train <- agaricus.train
|
#' train <- agaricus.train
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
#' train <- agaricus.train
|
#' train <- agaricus.train
|
||||||
#' test <- agaricus.test
|
#' test <- agaricus.test
|
||||||
#' bst <- xgboost(data = train$data, label = train$label, max.depth = 2,
|
#' 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)
|
#' pred <- predict(bst, test$data)
|
||||||
#'
|
#'
|
||||||
#' @export
|
#' @export
|
||||||
|
|||||||
@ -11,7 +11,7 @@ getinfo(object, ...)
|
|||||||
\S4method{getinfo}{xgb.DMatrix}(object, name)
|
\S4method{getinfo}{xgb.DMatrix}(object, name)
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
\item{object}{Object of class "xgb.DMatrix"}
|
\item{object}{Object of class \code{xgb.DMatrix}}
|
||||||
|
|
||||||
\item{...}{other parameters}
|
\item{...}{other parameters}
|
||||||
|
|
||||||
@ -20,6 +20,16 @@ getinfo(object, ...)
|
|||||||
\description{
|
\description{
|
||||||
Get information of an xgb.DMatrix object
|
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{
|
\examples{
|
||||||
data(agaricus.train, package='xgboost')
|
data(agaricus.train, package='xgboost')
|
||||||
train <- agaricus.train
|
train <- agaricus.train
|
||||||
|
|||||||
@ -22,6 +22,16 @@ setinfo(object, ...)
|
|||||||
\description{
|
\description{
|
||||||
Set information of an xgb.DMatrix object
|
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{
|
\examples{
|
||||||
data(agaricus.train, package='xgboost')
|
data(agaricus.train, package='xgboost')
|
||||||
train <- agaricus.train
|
train <- agaricus.train
|
||||||
|
|||||||
@ -59,7 +59,7 @@ data(agaricus.test, package='xgboost')
|
|||||||
train <- agaricus.train
|
train <- agaricus.train
|
||||||
test <- agaricus.test
|
test <- agaricus.test
|
||||||
bst <- xgboost(data = train$data, label = train$label, max.depth = 2,
|
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)
|
pred <- predict(bst, test$data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user