fix print.xgb.DMatrix doc
This commit is contained in:
parent
4b760762f9
commit
fb5291271e
@ -327,11 +327,20 @@ slice.xgb.DMatrix <- function(object, idxset, ...) {
|
||||
|
||||
#' Print xgb.DMatrix
|
||||
#'
|
||||
#' Print information about an xgb.DMatrix.
|
||||
#' Currently is would display
|
||||
#' Print information about xgb.DMatrix.
|
||||
#' Currently it displays dimensions and presence of info-fields and colnames.
|
||||
#'
|
||||
#' @param x an xgb.DMatrix object
|
||||
#' @param verbose whether to print colnames (when present)
|
||||
#'
|
||||
#'
|
||||
#' @examples
|
||||
#' data(agaricus.train, package='xgboost')
|
||||
#' train <- agaricus.train
|
||||
#' dtrain <- xgb.DMatrix(train$data, label=train$label)
|
||||
#'
|
||||
#' dtrain
|
||||
#' print(dtrain, verbose=T)
|
||||
#' @export
|
||||
print.xgb.DMatrix <- function(x, verbose=FALSE, ...) {
|
||||
cat('xgb.DMatrix dim:', nrow(x), 'x', ncol(x), ' info: ')
|
||||
|
||||
@ -12,7 +12,15 @@ print.xgb.DMatrix(x, verbose = FALSE, ...)
|
||||
\item{verbose}{whether to print colnames (when present)}
|
||||
}
|
||||
\description{
|
||||
Print information about an xgb.DMatrix.
|
||||
Currently is would display
|
||||
Print information about xgb.DMatrix.
|
||||
Currently it displays dimensions and presence of info-fields and colnames.
|
||||
}
|
||||
\examples{
|
||||
data(agaricus.train, package='xgboost')
|
||||
train <- agaricus.train
|
||||
dtrain <- xgb.DMatrix(train$data, label=train$label)
|
||||
|
||||
dtrain
|
||||
print(dtrain, verbose=T)
|
||||
}
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ value that represents missing value. Sometime a data use 0 or other extreme valu
|
||||
}
|
||||
\description{
|
||||
Contruct xgb.DMatrix object from dense matrix, sparse matrix
|
||||
or local file (that is a previously saved \code{xgb.DMatrix}).
|
||||
or local file (that was created previously by saving an \code{xgb.DMatrix}).
|
||||
}
|
||||
\examples{
|
||||
data(agaricus.train, package='xgboost')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user