31 lines
1.0 KiB
R
31 lines
1.0 KiB
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/xgb.DMatrix.R
|
|
\name{xgb.DMatrix}
|
|
\alias{xgb.DMatrix}
|
|
\title{Contruct xgb.DMatrix object}
|
|
\usage{
|
|
xgb.DMatrix(data, info = list(), missing = NA, ...)
|
|
}
|
|
\arguments{
|
|
\item{data}{a \code{matrix} object, a \code{dgCMatrix} object or a character representing a filename}
|
|
|
|
\item{info}{a list of information of the xgb.DMatrix object}
|
|
|
|
\item{missing}{Missing is only used when input is dense matrix, pick a float
|
|
value that represents missing value. Sometime a data use 0 or other extreme value to represents missing values.}
|
|
|
|
\item{...}{other information to pass to \code{info}.}
|
|
}
|
|
\description{
|
|
Contruct xgb.DMatrix object from dense matrix, sparse matrix
|
|
or local file (that was created previously by saving an \code{xgb.DMatrix}).
|
|
}
|
|
\examples{
|
|
data(agaricus.train, package='xgboost')
|
|
train <- agaricus.train
|
|
dtrain <- xgb.DMatrix(train$data, label=train$label)
|
|
xgb.DMatrix.save(dtrain, 'xgb.DMatrix.data')
|
|
dtrain <- xgb.DMatrix('xgb.DMatrix.data')
|
|
}
|
|
|