documentation example change

This commit is contained in:
El Potaeto 2015-01-09 18:26:56 +01:00
parent 51935851bd
commit a3493934d1
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@
#' bst <- xgboost(data = train$data, label = train$label, max.depth = 2, #' bst <- xgboost(data = train$data, label = train$label, max.depth = 2,
#' eta = 1, nround = 2,objective = "binary:logistic") #' eta = 1, nround = 2,objective = "binary:logistic")
#' # save the model in file 'xgb.model.dump' #' # save the model in file 'xgb.model.dump'
#' xgb.dump(bst, 'xgb.model.dump') #' xgb.dump(bst, 'xgb.model.dump', with.stats = T)
#' #'
#' # print the model without saving it to a file #' # print the model without saving it to a file
#' print(xgb.dump(bst)) #' print(xgb.dump(bst))

View File

@ -37,7 +37,7 @@ test <- agaricus.test
bst <- xgboost(data = train$data, label = train$label, max.depth = 2, bst <- xgboost(data = train$data, label = train$label, max.depth = 2,
eta = 1, nround = 2,objective = "binary:logistic") eta = 1, nround = 2,objective = "binary:logistic")
# save the model in file 'xgb.model.dump' # save the model in file 'xgb.model.dump'
xgb.dump(bst, 'xgb.model.dump') xgb.dump(bst, 'xgb.model.dump', with.stats = T)
# print the model without saving it to a file # print the model without saving it to a file
print(xgb.dump(bst)) print(xgb.dump(bst))