| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/xgb.cv.R |
| 3 |
\name{print.xgb.cv.synchronous} |
| 4 |
\alias{print.xgb.cv.synchronous} |
| 5 |
\title{Print xgb.cv result} |
| 6 |
\usage{ |
| 7 |
\method{print}{xgb.cv.synchronous}(x, verbose = FALSE, ...) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{x}{An \code{xgb.cv.synchronous} object.} |
| 11 |
|
| 12 |
\item{verbose}{Whether to print detailed data.} |
| 13 |
|
| 14 |
\item{...}{Passed to \code{data.table.print()}.} |
| 15 |
} |
| 16 |
\description{ |
| 17 |
Prints formatted results of \code{\link[=xgb.cv]{xgb.cv()}}. |
| 18 |
} |
| 19 |
\details{ |
| 20 |
When not verbose, it would only print the evaluation results, |
| 21 |
including the best iteration (when available). |
| 22 |
} |
| 23 |
\examples{ |
| 24 |
data(agaricus.train, package = "xgboost") |
| 25 |
|
| 26 |
train <- agaricus.train |
| 27 |
cv <- xgb.cv( |
| 28 |
data = xgb.DMatrix(train$data, label = train$label, nthread = 1), |
| 29 |
nfold = 5, |
| 30 |
nrounds = 2, |
| 31 |
params = xgb.params( |
| 32 |
max_depth = 2, |
| 33 |
nthread = 2, |
| 34 |
objective = "binary:logistic" |
| 35 |
) |
| 36 |
) |
| 37 |
print(cv) |
| 38 |
print(cv, verbose = TRUE) |
| 39 |
|
| 40 |
} |