From e04b6aaec54fb7abbbb3e9b11630baa4b022e275 Mon Sep 17 00:00:00 2001 From: hetong Date: Sat, 6 Sep 2014 19:02:23 -0700 Subject: [PATCH] add documentation for datasets --- R-package/R/xgboost.R | 55 +++++++++++++++++++++++++++++++++ R-package/man/agaricus.train.Rd | 33 ++++++++++++++++++++ R-package/man/xgb.cv.Rd | 2 +- 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 R-package/man/agaricus.train.Rd diff --git a/R-package/R/xgboost.R b/R-package/R/xgboost.R index 24c50fec0..a08ca3fa8 100644 --- a/R-package/R/xgboost.R +++ b/R-package/R/xgboost.R @@ -53,3 +53,58 @@ xgboost <- function(data = NULL, label = NULL, params = list(), nrounds, return(bst) } + + +#' Training part from Mushroom Data Set +#' +#' This data set is originally from the Mushroom data set, +#' UCI Machine Learning Repository. +#' +#' This data set includes the following fields: +#' +#' \itemize{ +#' \item \code{label} the label for each record +#' \item \code{data} a sparse Matrix of \code{dgCMatrix} class, with 127 rows. +#' } +#' +#'#' @references +#' https://archive.ics.uci.edu/ml/datasets/Mushroom +#' +#' Bache, K. & Lichman, M. (2013). UCI Machine Learning Repository +#' [http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, +#' School of Information and Computer Science. +#' +#' @docType data +#' @keywords datasets +#' @name agaricus.train +#' @usage data(agaricus.train) +#' @format A list containing a label vector, and a dgCMatrix object with 6513 +#' rows and 127 variables +NULL + +#' Test part from Mushroom Data Set +#' +#' This data set is originally from the Mushroom data set, +#' UCI Machine Learning Repository. +#' +#' This data set includes the following fields: +#' +#' \itemize{ +#' \item \code{label} the label for each record +#' \item \code{data} a sparse Matrix of \code{dgCMatrix} class, with 127 rows. +#' } +#' +#' @references +#' https://archive.ics.uci.edu/ml/datasets/Mushroom +#' +#' Bache, K. & Lichman, M. (2013). UCI Machine Learning Repository +#' [http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, +#' School of Information and Computer Science. +#' +#' @docType data +#' @keywords datasets +#' @name agaricus.test +#' @usage data(agaricus.test) +#' @format A list containing a label vector, and a dgCMatrix object with 1611 +#' rows and 127 variables +NULL diff --git a/R-package/man/agaricus.train.Rd b/R-package/man/agaricus.train.Rd new file mode 100644 index 000000000..d1a401ecd --- /dev/null +++ b/R-package/man/agaricus.train.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2 (4.0.1): do not edit by hand +\docType{data} +\name{agaricus.train} +\alias{agaricus.train} +\title{Training part from Mushroom Data Set} +\format{A list containing a label vector, and a dgCMatrix object with 6513 +rows and 127 variables} +\usage{ +data(agaricus.train) +} +\description{ +This data set is originally from the Mushroom data set, +UCI Machine Learning Repository. +} +\details{ +This data set includes the following fields: + +\itemize{ + \item \code{label} the label for each record + \item \code{data} a sparse Matrix of \code{dgCMatrix} class, with 127 rows. +} + +#' +} +\references{ +https://archive.ics.uci.edu/ml/datasets/Mushroom + +Bache, K. & Lichman, M. (2013). UCI Machine Learning Repository +[http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, +School of Information and Computer Science. +} +\keyword{datasets} + diff --git a/R-package/man/xgb.cv.Rd b/R-package/man/xgb.cv.Rd index 10ee6f5f0..b7fa677f9 100644 --- a/R-package/man/xgb.cv.Rd +++ b/R-package/man/xgb.cv.Rd @@ -30,7 +30,7 @@ xgb.cv(params = list(), data, nrounds, nfold, label = NULL, showsd = TRUE, \item{label}{option field, when data is Matrix} -\item{showd}{boolean, whether show standard deviation of cross validation} +\item{showsd}{boolean, whether show standard deviation of cross validation} \item{metrics,}{list of evaluation metrics to be used in corss validation, when it is not specified, the evaluation metric is chosen according to objective function.