fix relative to examples #Rstat

This commit is contained in:
pommedeterresautee
2015-11-30 16:21:43 +01:00
parent 6e370b90fd
commit 425a5dd094
6 changed files with 6 additions and 10 deletions

View File

@@ -43,9 +43,8 @@ data(agaricus.train, package='xgboost')
#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 = agaricus.train$data, label = agaricus.train$label, max.depth = 2,
eta = 1, nthread = 2, nround = 2,objective = "binary:logistic")
#agaricus.test$data@Dimnames[[2]] represents the column names of the sparse matrix.