From 89b9965cbf97e099aa4be1afcd94f74517f2f679 Mon Sep 17 00:00:00 2001 From: tqchen Date: Sat, 6 Sep 2014 22:40:51 -0700 Subject: [PATCH] change max depth --- R-package/demo/boost_from_prediction.R | 2 +- R-package/demo/cross_validation.R | 4 ++-- R-package/demo/custom_objective.R | 2 +- R-package/demo/predict_first_ntree.R | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/R-package/demo/boost_from_prediction.R b/R-package/demo/boost_from_prediction.R index 7372717f8..bbf45f4a0 100644 --- a/R-package/demo/boost_from_prediction.R +++ b/R-package/demo/boost_from_prediction.R @@ -11,7 +11,7 @@ watchlist <- list(eval = dtest, train = dtrain) # print('start running example to start from a initial prediction') # train xgboost for 1 round -param <- list(max_depth=2,eta=1,silent=1,objective='binary:logistic') +param <- list(max.depth=2,eta=1,silent=1,objective='binary:logistic') bst <- xgb.train( param, dtrain, 1, watchlist ) # Note: we need the margin value instead of transformed prediction in set_base_margin # do predict with output_margin=TRUE, will always give you margin values before logistic transformation diff --git a/R-package/demo/cross_validation.R b/R-package/demo/cross_validation.R index 7fa1f16b2..c7e7ba537 100644 --- a/R-package/demo/cross_validation.R +++ b/R-package/demo/cross_validation.R @@ -6,7 +6,7 @@ dtrain <- xgb.DMatrix(agaricus.train$data, label = agaricus.train$label) dtest <- xgb.DMatrix(agaricus.test$data, label = agaricus.test$label) nround <- 2 -param <- list(max_depth=2,eta=1,silent=1,objective='binary:logistic') +param <- list(max.depth=2,eta=1,silent=1,objective='binary:logistic') cat('running cross validation\n') # do cross validation, this will print result out as @@ -40,7 +40,7 @@ evalerror <- function(preds, dtrain) { return(list(metric = "error", value = err)) } -param <- list(max_depth=2,eta=1,silent=1) +param <- list(max.depth=2,eta=1,silent=1) # train with customized objective xgb.cv(param, dtrain, nround, nfold = 5, obj = logregobj, feval=evalerror) diff --git a/R-package/demo/custom_objective.R b/R-package/demo/custom_objective.R index 017961876..9b0d45465 100644 --- a/R-package/demo/custom_objective.R +++ b/R-package/demo/custom_objective.R @@ -8,7 +8,7 @@ dtest <- xgb.DMatrix(agaricus.test$data, label = agaricus.test$label) # note: for customized objective function, we leave objective as default # note: what we are getting is margin value in prediction # you must know what you are doing -param <- list(max_depth=2,eta=1,silent=1) +param <- list(max.depth=2,eta=1,silent=1) watchlist <- list(eval = dtest, train = dtrain) num_round <- 2 diff --git a/R-package/demo/predict_first_ntree.R b/R-package/demo/predict_first_ntree.R index f8e45f2d8..964203e9f 100644 --- a/R-package/demo/predict_first_ntree.R +++ b/R-package/demo/predict_first_ntree.R @@ -5,7 +5,7 @@ data(agaricus.test, package='xgboost') dtrain <- xgb.DMatrix(agaricus.train$data, label = agaricus.train$label) dtest <- xgb.DMatrix(agaricus.test$data, label = agaricus.test$label) -param <- list(max_depth=2,eta=1,silent=1,objective='binary:logistic') +param <- list(max.depth=2,eta=1,silent=1,objective='binary:logistic') watchlist <- list(eval = dtest, train = dtrain) nround = 2