R maintenance Feb2017 (#2045)

* [R] better argument check in xgb.DMatrix; fixes #1480

* [R] showsd was a dummy; fixes #2044

* [R] better categorical encoding explanation in vignette; fixes #1989

* [R] new roxygen version docs update
This commit is contained in:
Vadim Khotilovich
2017-02-20 12:02:40 -06:00
committed by Tianqi Chen
parent 63aec12a13
commit b4d97d3cb8
42 changed files with 19 additions and 48 deletions

View File

@@ -29,4 +29,3 @@ Bache, K. & Lichman, M. (2013). UCI Machine Learning Repository
School of Information and Computer Science.
}
\keyword{datasets}

View File

@@ -29,4 +29,3 @@ Bache, K. & Lichman, M. (2013). UCI Machine Learning Repository
School of Information and Computer Science.
}
\keyword{datasets}

View File

@@ -35,4 +35,3 @@ with the objects available inside of the \code{xgb.train} and \code{xgb.cv} inte
\code{\link{xgb.train}},
\code{\link{xgb.cv}}
}

View File

@@ -41,4 +41,3 @@ Callback function expects the following values to be set in its calling frame:
\seealso{
\code{\link{callbacks}}
}

View File

@@ -60,4 +60,3 @@ Callback function expects the following values to be set in its calling frame:
\code{\link{callbacks}},
\code{\link{xgb.attr}}
}

View File

@@ -29,4 +29,3 @@ Callback function expects the following values to be set in its calling frame:
\seealso{
\code{\link{callbacks}}
}

View File

@@ -4,10 +4,12 @@
\alias{cb.print.evaluation}
\title{Callback closure for printing the result of evaluation}
\usage{
cb.print.evaluation(period = 1)
cb.print.evaluation(period = 1, showsd = TRUE)
}
\arguments{
\item{period}{results would be printed every number of periods}
\item{showsd}{whether standard deviations should be printed (when available)}
}
\description{
Callback closure for printing the result of evaluation
@@ -25,4 +27,3 @@ Callback function expects the following values to be set in its calling frame:
\seealso{
\code{\link{callbacks}}
}

View File

@@ -34,4 +34,3 @@ Callback function expects the following values to be set in its calling frame:
\seealso{
\code{\link{callbacks}}
}

View File

@@ -31,4 +31,3 @@ Callback function expects the following values to be set in its calling frame:
\seealso{
\code{\link{callbacks}}
}

View File

@@ -26,4 +26,3 @@ stopifnot(ncol(dtrain) == ncol(train$data))
stopifnot(all(dim(dtrain) == dim(train$data)))
}

View File

@@ -33,4 +33,3 @@ colnames(dtrain) <- make.names(1:ncol(train$data))
print(dtrain, verbose=TRUE)
}

View File

@@ -40,4 +40,3 @@ setinfo(dtrain, 'label', 1-labels)
labels2 <- getinfo(dtrain, 'label')
stopifnot(all(labels2 == 1-labels))
}

View File

@@ -126,4 +126,3 @@ plot(err, type='l', ylim=c(0,0.1), xlab='#trees')
\seealso{
\code{\link{xgb.train}}.
}

View File

@@ -27,4 +27,3 @@ print(bst)
print(bst, verbose=TRUE)
}

View File

@@ -26,4 +26,3 @@ dtrain
print(dtrain, verbose=TRUE)
}

View File

@@ -29,4 +29,3 @@ print(cv)
print(cv, verbose=TRUE)
}

View File

@@ -41,4 +41,3 @@ setinfo(dtrain, 'label', 1-labels)
labels2 <- getinfo(dtrain, 'label')
stopifnot(all.equal(labels2, 1-labels))
}

View File

@@ -1,9 +1,9 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xgb.DMatrix.R
\name{slice}
\alias{[.xgb.DMatrix}
\alias{slice}
\alias{slice.xgb.DMatrix}
\alias{[.xgb.DMatrix}
\title{Get a new DMatrix containing the specified rows of
orginal xgb.DMatrix object}
\usage{
@@ -38,4 +38,3 @@ labels2 <- getinfo(dsub, 'label')
all.equal(labels1, labels2)
}

View File

@@ -46,4 +46,3 @@ bst1 <- xgb.Booster.complete(bst1)
print(bst1$handle)
}

View File

@@ -27,4 +27,3 @@ dtrain <- xgb.DMatrix(train$data, label=train$label)
xgb.DMatrix.save(dtrain, 'xgb.DMatrix.data')
dtrain <- xgb.DMatrix('xgb.DMatrix.data')
}

View File

@@ -21,4 +21,3 @@ dtrain <- xgb.DMatrix(train$data, label=train$label)
xgb.DMatrix.save(dtrain, 'xgb.DMatrix.data')
dtrain <- xgb.DMatrix('xgb.DMatrix.data')
}

View File

@@ -83,4 +83,3 @@ xgb.attributes(bst1) <- list(a = NULL, b = NULL)
print(xgb.attributes(bst1))
}

View File

@@ -90,4 +90,3 @@ cat(paste("The accuracy was", accuracy.before, "before adding leaf features and
accuracy.after, "!\\n"))
}

View File

@@ -140,4 +140,3 @@ print(cv)
print(cv, verbose=TRUE)
}

View File

@@ -53,4 +53,3 @@ print(xgb.dump(bst, with_stats = TRUE))
cat(xgb.dump(bst, with_stats = TRUE, dump_format='json'))
}

View File

@@ -63,4 +63,3 @@ bst <- xgboost(data = agaricus.train$data, label = agaricus.train$label, max_dep
xgb.importance(model = bst)
}

View File

@@ -38,4 +38,3 @@ pred <- predict(bst, test$data)
\seealso{
\code{\link{xgb.save}}, \code{\link{xgb.Booster.complete}}.
}

View File

@@ -67,4 +67,3 @@ bst <- xgboost(data = agaricus.train$data, label = agaricus.train$label, max_dep
merge(dt, dt[, .(ID, Y.Feature=Feature)], by.x='Yes', by.y='ID', all.x=TRUE)[order(Tree,Node)]
}

View File

@@ -29,4 +29,3 @@ bst <- xgboost(data = train$data, label = train$label, max_depth = 2,
xgb.parameters(bst) <- list(eta = 0.1)
}

View File

@@ -72,4 +72,3 @@ xgb.plot.deepness(bst, which='med.weight', pch=16, col=rgb(0,0,1,0.3), cex=2)
\seealso{
\code{\link{xgb.train}}, \code{\link{xgb.model.dt.tree}}.
}

View File

@@ -79,4 +79,3 @@ gg + ggplot2::ylab("Frequency")
\seealso{
\code{\link[graphics]{barplot}}.
}

View File

@@ -56,4 +56,3 @@ p <- xgb.plot.multi.trees(model = bst, feature_names = colnames(agaricus.train$d
print(p)
}

View File

@@ -74,4 +74,3 @@ xgb.plot.tree(feature_names = colnames(agaricus.train$data), model = bst,
trees = 0, show_node_id = TRUE)
}

View File

@@ -38,4 +38,3 @@ pred <- predict(bst, test$data)
\seealso{
\code{\link{xgb.load}}, \code{\link{xgb.Booster.complete}}.
}

View File

@@ -25,4 +25,3 @@ bst <- xgb.load(raw)
pred <- predict(bst, test$data)
}

View File

@@ -264,4 +264,3 @@ pred <- predict(bst, agaricus.test$data)
\code{\link{predict.xgb.Booster}},
\code{\link{xgb.cv}}
}

View File

@@ -14,4 +14,3 @@ A deprecation warning is shown when any of the deprecated parameters is used in
An additional warning is shown when there was a partial match to a deprecated parameter
(as R is able to partially match parameter names).
}