generated documentation with ROxygen2

This commit is contained in:
El Potaeto 2014-12-28 10:46:31 +01:00
parent e63c79d6c6
commit ce83611a72
16 changed files with 77 additions and 26 deletions

View File

@ -16,3 +16,6 @@ exportMethods(predict)
import(methods)
importClassesFrom(Matrix,dgCMatrix)
importClassesFrom(Matrix,dgeMatrix)
importFrom(data.table,":=")
importFrom(data.table,data.table)
importFrom(magrittr,"%>%")

View File

@ -1,4 +1,5 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/xgboost.R
\docType{data}
\name{agaricus.test}
\alias{agaricus.test}

View File

@ -1,4 +1,5 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/xgboost.R
\docType{data}
\name{agaricus.train}
\alias{agaricus.train}

View File

@ -1,4 +1,5 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/getinfo.xgb.DMatrix.R
\docType{methods}
\name{getinfo}
\alias{getinfo}
@ -12,9 +13,9 @@ getinfo(object, ...)
\arguments{
\item{object}{Object of class "xgb.DMatrix"}
\item{name}{the name of the field to get}
\item{...}{other parameters}
\item{name}{the name of the field to get}
}
\description{
Get information of an xgb.DMatrix object

View File

@ -1,11 +1,12 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/predict.xgb.Booster.R
\docType{methods}
\name{predict,xgb.Booster-method}
\alias{predict,xgb.Booster-method}
\title{Predict method for eXtreme Gradient Boosting model}
\usage{
\S4method{predict}{xgb.Booster}(object, newdata, outputmargin = FALSE,
ntreelimit = NULL)
\S4method{predict}{xgb.Booster}(object, newdata, missing = NULL,
outputmargin = FALSE, ntreelimit = NULL)
}
\arguments{
\item{object}{Object of class "xgb.Boost"}

View File

@ -1,4 +1,5 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/setinfo.xgb.DMatrix.R
\docType{methods}
\name{setinfo}
\alias{setinfo}
@ -12,11 +13,11 @@ setinfo(object, ...)
\arguments{
\item{object}{Object of class "xgb.DMatrix"}
\item{...}{other parameters}
\item{name}{the name of the field to get}
\item{info}{the specific field of information to set}
\item{...}{other parameters}
}
\description{
Set information of an xgb.DMatrix object

View File

@ -1,4 +1,5 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/slice.xgb.DMatrix.R
\docType{methods}
\name{slice}
\alias{slice}
@ -13,9 +14,9 @@ slice(object, ...)
\arguments{
\item{object}{Object of class "xgb.DMatrix"}
\item{idxset}{a integer vector of indices of rows needed}
\item{...}{other parameters}
\item{idxset}{a integer vector of indices of rows needed}
}
\description{
Get a new DMatrix containing the specified rows of

View File

@ -1,4 +1,5 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% 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}

View File

@ -1,4 +1,5 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/xgb.DMatrix.save.R
\name{xgb.DMatrix.save}
\alias{xgb.DMatrix.save}
\title{Save xgb.DMatrix object to binary file}

View File

@ -1,10 +1,12 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/xgb.cv.R
\name{xgb.cv}
\alias{xgb.cv}
\title{Cross Validation}
\usage{
xgb.cv(params = list(), data, nrounds, nfold, label = NULL, showsd = TRUE,
metrics = list(), obj = NULL, feval = NULL, ...)
xgb.cv(params = list(), data, nrounds, nfold, label = NULL,
missing = NULL, showsd = TRUE, metrics = list(), obj = NULL,
feval = NULL, ...)
}
\arguments{
\item{params}{the list of parameters. Commonly used ones are:

View File

@ -1,4 +1,5 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/xgb.dump.R
\name{xgb.dump}
\alias{xgb.dump}
\title{Save xgboost model to text file}

View File

@ -0,0 +1,33 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/xgb.importance.R
\name{xgb.importance}
\alias{xgb.importance}
\title{Show importance of features in a model}
\usage{
xgb.importance(feature_names, filename_dump)
}
\arguments{
\item{feature_names}{names of each feature as a character vector. Can be extracted from a sparse matrix.}
\item{filename_dump}{the name of the text file.}
}
\description{
Read a xgboost model in text file format. Return a data.table of the features with their weight.
}
\examples{
data(agaricus.train, package='xgboost')
data(agaricus.test, package='xgboost')
#Both dataset are list with two items, a sparse matrix and labels (outcome column which will be learned).
#Each column of the sparse Matrix is a feature in one hot encoding format.
train <- agaricus.train
test <- agaricus.test
bst <- xgboost(data = train$data, label = train$label, max.depth = 2,
eta = 1, nround = 2,objective = "binary:logistic")
xgb.dump(bst, 'xgb.model.dump')
#agaricus.test$data@Dimnames[[2]] represents the column name of the sparse matrix.
xgb.importance(agaricus.test$data@Dimnames[[2]], 'xgb.model.dump')
}

View File

@ -1,4 +1,5 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/xgb.load.R
\name{xgb.load}
\alias{xgb.load}
\title{Load xgboost model from binary file}

View File

@ -1,4 +1,5 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/xgb.save.R
\name{xgb.save}
\alias{xgb.save}
\title{Save xgboost model to binary file}

View File

@ -1,4 +1,5 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/xgb.train.R
\name{xgb.train}
\alias{xgb.train}
\title{eXtreme Gradient Boosting Training}

View File

@ -1,10 +1,11 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/xgboost.R
\name{xgboost}
\alias{xgboost}
\title{eXtreme Gradient Boosting (Tree) library}
\usage{
xgboost(data = NULL, label = NULL, params = list(), nrounds,
verbose = 1, ...)
xgboost(data = NULL, label = NULL, missing = NULL, params = list(),
nrounds, verbose = 1, ...)
}
\arguments{
\item{data}{takes \code{matrix}, \code{dgCMatrix}, local data file or