Rでの予測にGBMパッケージを使用しています。トレーニングは妥当なエラー率で非常にうまく機能しますが、新しいレベルの因子変数を含むトレーニングセットで予測を実行したい場合、次のエラーが発生しました。
gbm1 <- gbm(SalePrice ~., data=bb,distribution="gaussian",n.trees=7000,cv.folds=3,shrinkage=0.001,interaction.depth=4)
f.predict <- exp(predict.gbm(gbm1,data.frame(bbv),n.trees=7000))
Error in predict.gbm(gbm1, data.frame(bbv), n.trees = 7000) :
New levels for variable <and the name of the levels are listed>
エラーテキストを検索しようとしましたが、GBMコード自体のみが見つかりました;(
どんな提案でも大歓迎です!