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:
committed by
Tianqi Chen
parent
63aec12a13
commit
b4d97d3cb8
@@ -29,4 +29,3 @@ Bache, K. & Lichman, M. (2013). UCI Machine Learning Repository
|
||||
School of Information and Computer Science.
|
||||
}
|
||||
\keyword{datasets}
|
||||
|
||||
|
||||
@@ -29,4 +29,3 @@ Bache, K. & Lichman, M. (2013). UCI Machine Learning Repository
|
||||
School of Information and Computer Science.
|
||||
}
|
||||
\keyword{datasets}
|
||||
|
||||
|
||||
@@ -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}}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,4 +41,3 @@ Callback function expects the following values to be set in its calling frame:
|
||||
\seealso{
|
||||
\code{\link{callbacks}}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,4 +60,3 @@ Callback function expects the following values to be set in its calling frame:
|
||||
\code{\link{callbacks}},
|
||||
\code{\link{xgb.attr}}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,4 +29,3 @@ Callback function expects the following values to be set in its calling frame:
|
||||
\seealso{
|
||||
\code{\link{callbacks}}
|
||||
}
|
||||
|
||||
|
||||
@@ -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}}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,4 +34,3 @@ Callback function expects the following values to be set in its calling frame:
|
||||
\seealso{
|
||||
\code{\link{callbacks}}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,4 +31,3 @@ Callback function expects the following values to be set in its calling frame:
|
||||
\seealso{
|
||||
\code{\link{callbacks}}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,4 +26,3 @@ stopifnot(ncol(dtrain) == ncol(train$data))
|
||||
stopifnot(all(dim(dtrain) == dim(train$data)))
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -33,4 +33,3 @@ colnames(dtrain) <- make.names(1:ncol(train$data))
|
||||
print(dtrain, verbose=TRUE)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -40,4 +40,3 @@ setinfo(dtrain, 'label', 1-labels)
|
||||
labels2 <- getinfo(dtrain, 'label')
|
||||
stopifnot(all(labels2 == 1-labels))
|
||||
}
|
||||
|
||||
|
||||
@@ -126,4 +126,3 @@ plot(err, type='l', ylim=c(0,0.1), xlab='#trees')
|
||||
\seealso{
|
||||
\code{\link{xgb.train}}.
|
||||
}
|
||||
|
||||
|
||||
@@ -27,4 +27,3 @@ print(bst)
|
||||
print(bst, verbose=TRUE)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -26,4 +26,3 @@ dtrain
|
||||
print(dtrain, verbose=TRUE)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -29,4 +29,3 @@ print(cv)
|
||||
print(cv, verbose=TRUE)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -41,4 +41,3 @@ setinfo(dtrain, 'label', 1-labels)
|
||||
labels2 <- getinfo(dtrain, 'label')
|
||||
stopifnot(all.equal(labels2, 1-labels))
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -46,4 +46,3 @@ bst1 <- xgb.Booster.complete(bst1)
|
||||
print(bst1$handle)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
|
||||
|
||||
@@ -83,4 +83,3 @@ xgb.attributes(bst1) <- list(a = NULL, b = NULL)
|
||||
print(xgb.attributes(bst1))
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -90,4 +90,3 @@ cat(paste("The accuracy was", accuracy.before, "before adding leaf features and
|
||||
accuracy.after, "!\\n"))
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -140,4 +140,3 @@ print(cv)
|
||||
print(cv, verbose=TRUE)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -53,4 +53,3 @@ print(xgb.dump(bst, with_stats = TRUE))
|
||||
cat(xgb.dump(bst, with_stats = TRUE, dump_format='json'))
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -63,4 +63,3 @@ bst <- xgboost(data = agaricus.train$data, label = agaricus.train$label, max_dep
|
||||
xgb.importance(model = bst)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -38,4 +38,3 @@ pred <- predict(bst, test$data)
|
||||
\seealso{
|
||||
\code{\link{xgb.save}}, \code{\link{xgb.Booster.complete}}.
|
||||
}
|
||||
|
||||
|
||||
@@ -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)]
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -29,4 +29,3 @@ bst <- xgboost(data = train$data, label = train$label, max_depth = 2,
|
||||
xgb.parameters(bst) <- list(eta = 0.1)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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}}.
|
||||
}
|
||||
|
||||
|
||||
@@ -79,4 +79,3 @@ gg + ggplot2::ylab("Frequency")
|
||||
\seealso{
|
||||
\code{\link[graphics]{barplot}}.
|
||||
}
|
||||
|
||||
|
||||
@@ -56,4 +56,3 @@ p <- xgb.plot.multi.trees(model = bst, feature_names = colnames(agaricus.train$d
|
||||
print(p)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -74,4 +74,3 @@ xgb.plot.tree(feature_names = colnames(agaricus.train$data), model = bst,
|
||||
trees = 0, show_node_id = TRUE)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -38,4 +38,3 @@ pred <- predict(bst, test$data)
|
||||
\seealso{
|
||||
\code{\link{xgb.load}}, \code{\link{xgb.Booster.complete}}.
|
||||
}
|
||||
|
||||
|
||||
@@ -25,4 +25,3 @@ bst <- xgb.load(raw)
|
||||
pred <- predict(bst, test$data)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -264,4 +264,3 @@ pred <- predict(bst, agaricus.test$data)
|
||||
\code{\link{predict.xgb.Booster}},
|
||||
\code{\link{xgb.cv}}
|
||||
}
|
||||
|
||||
|
||||
@@ -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).
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user