Update lib version dependencies (for DiagrammeR mainly)
Fix @export tag in each R file (for Roxygen 5, otherwise it doesn't work anymore) Regerate Roxygen doc
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
% Generated by roxygen2 (4.1.1): do not edit by hand
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/xgb.importance.R
|
||||
\name{xgb.importance}
|
||||
\alias{xgb.importance}
|
||||
@@ -24,7 +24,7 @@ xgb.importance(feature_names = NULL, filename_dump = NULL, model = NULL,
|
||||
A \code{data.table} of the features used in the model with their average gain (and their weight for boosted tree model) in the model.
|
||||
}
|
||||
\description{
|
||||
Read a xgboost model text dump.
|
||||
Read a xgboost model text dump.
|
||||
Can be tree or linear model (text dump of linear model are only supported in dev version of \code{Xgboost} for now).
|
||||
}
|
||||
\details{
|
||||
@@ -32,7 +32,7 @@ This is the function to understand the model trained (and through your model, yo
|
||||
|
||||
Results are returned for both linear and tree models.
|
||||
|
||||
\code{data.table} is returned by the function.
|
||||
\code{data.table} is returned by the function.
|
||||
There are 3 columns :
|
||||
\itemize{
|
||||
\item \code{Features} name of the features as provided in \code{feature_names} or already present in the model dump.
|
||||
@@ -53,12 +53,12 @@ If you need to remember one thing only: until you want to leave us early, don't
|
||||
\examples{
|
||||
data(agaricus.train, package='xgboost')
|
||||
|
||||
# Both dataset are list with two items, a sparse matrix and labels
|
||||
# (labels = outcome column which will be learned).
|
||||
# Both dataset are list with two items, a sparse matrix and labels
|
||||
# (labels = outcome column which will be learned).
|
||||
# Each column of the sparse Matrix is a feature in one hot encoding format.
|
||||
train <- agaricus.train
|
||||
|
||||
bst <- xgboost(data = train$data, label = train$label, max.depth = 2,
|
||||
bst <- xgboost(data = train$data, label = train$label, max.depth = 2,
|
||||
eta = 1, nthread = 2, nround = 2,objective = "binary:logistic")
|
||||
|
||||
# train$data@Dimnames[[2]] represents the column names of the sparse matrix.
|
||||
@@ -66,5 +66,6 @@ xgb.importance(train$data@Dimnames[[2]], model = bst)
|
||||
|
||||
# Same thing with co-occurence computation this time
|
||||
xgb.importance(train$data@Dimnames[[2]], model = bst, data = train$data, label = train$label)
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user