documentation example change
This commit is contained in:
parent
51935851bd
commit
a3493934d1
@ -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))
|
||||||
|
|||||||
@ -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))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user