私は、例えば、次のコードを実行しています:xgb3つのキャレット行列かどうか?
v.ctrl <- trainControl(method = "repeatedcv", repeats = 1,number = 3,
summaryFunction = twoClassSummary,
classProbs = TRUE,
allowParallel=T)
xgb.grid <- expand.grid(nrounds = 10000,
eta = c(0.01,0.05,0.1),
max_depth = c(2,4,6,8,10,14))
set.seed(45)
xgb_tune <-train(target~.,
data=train,
method="xgbTree",
trControl=cv.ctrl,
tuneGrid=xgb.grid,
verbose=T,
metric="LogLoss",
nthread =3)
エラーは単純です:
Error in train(target ~ ., data = train, method = "xgbTree", trControl = cv.ctrl, : unused arguments (data = train, method = "xgbTree", trControl = cv.ctrl, tuneGrid = xgb.grid, verbose = T, metric = "LogLoss", nthread = 3)
マイセットstructure(list(feature19 = c(0.58776, 0.40764, 0.4708, 0.67577, 0.41681, 0.5291, 0.33197, 0.24138, 0.49776, 0.58293), feature6 = c(0.48424, 0.48828, 0.58975, 0.33185, 0.6917, 0.53813, 0.76235, 0.7036, 0.33871, 0.51928), feature10 = c(0.61347, 0.65801, 0.69926, 0.23311, 0.8134, 0.55321, 0.72926, 0.663, 0.49206, 0.55531), feature20 = c(0.39615, 0.49085, 0.50274, 0.6038, 0.37487, 0.53582, 0.62004, 0.63819, 0.37858, 0.40478), feature7 = c(0.55901, 0.38715, 0.50705, 0.76004, 0.3207, 0.54697, 0.31014, 0.21932, 0.4831, 0.52253), feature4 = c(0.5379, 0.52526, 0.44264, 0.28974, 0.65142, 0.41382, 0.44205, 0.47272, 0.6303, 0.56405), feature16 = c(0.41849, 0.45628, 0.37617, 0.39334, 0.46727, 0.36297, 0.3054, 0.41256, 0.6302, 0.41892), feature2 = c(0.62194, 0.5555, 0.61301, 0.27452, 0.74148, 0.49785, 0.5215, 0.46492, 0.54834, 0.58106), feature21 = c(0.32122, 0.37679, 0.35889, 0.74368, 0.18306, 0.47027, 0.40567, 0.47801, 0.41617, 0.35244), feature12 = c(0.56532, 0.55707, 0.49138, 0.24911, 0.69341, 0.42176, 0.41445, 0.45535, 0.62379, 0.5523), target = c(1L, 0L, 0L, 1L, 0L, 0L, 0L, 1L, 1L, 1L)), .Names = c("feature19", "feature6", "feature10", "feature20", "feature7", "feature4", "feature16", "feature2", "feature21", "feature12", "target"), row.names = c(NA, 10L), class = "data.frame")
誰もが私はxgbtreeのためのデータを再処理する必要があるかどうかを知っていますか? Thx u!
3つのリサンプル。また、心配することはありませんが、@ Ze4はすべての情報を与えるわけではありません。生成される警告があります(「あなたは回帰をしようとしていますが、結果には2つの可能な値しかありません。分類したいのですか?もしそうなら、2つのレベル係数を結果欄として使用してください。これらの問題のいくつか。バージョンはわかりませんが、「エラー:チューニングパラメータグリッドには、nrounds、max_depth、eta、gamma、colsample_bytree、min_child_weight、subsampleの列が必要です」というエラーメッセージが表示されます。 – topepo