30 lines
860 B
R
30 lines
860 B
R
% Generated by roxygen2 (4.1.0): 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 = 0, ...)
|
|
}
|
|
\arguments{
|
|
\item{data}{a \code{matrix} object, a \code{dgCMatrix} object or a character
|
|
indicating the data file.}
|
|
|
|
\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}
|
|
|
|
\item{...}{other information to pass to \code{info}.}
|
|
}
|
|
\description{
|
|
Contruct xgb.DMatrix object from dense matrix, sparse matrix or local file.
|
|
}
|
|
\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')
|
|
}
|
|
|