This commit is contained in:
tqchen
2014-09-05 22:46:09 -07:00
parent 831a102d48
commit ab238ff831
3 changed files with 16 additions and 6 deletions

View File

@@ -3,7 +3,8 @@ require(methods)
# Directly read in local file
dtrain <- xgb.DMatrix("agaricus.txt.train")
history <- xgb.cv(list("max_depth"=3, "eta"=1,
"objective"="binary:logistic"),
dtrain, nround=3, nfold = 5, "eval_metric"="error")
history <- xgb.cv( data = dtrain, nround=3, nfold = 5, metrics=list("rmse","auc"),
"max_depth"=3, "eta"=1,
"objective"="binary:logistic")