我正在尝试使用R的h2o包实现一个梯度提升机模型。然而,模型总是会删除我知道在其他模型构建中非常重要的一列。
Warning message: In .h2o.startModelJob(algo, params, h2oRestApiVersion) : Dropping bad and constant columns:['mycolumn']
如何阻止h2o删除这一列?我尝试了以下方法:
gbm_fit<-h2o.gbm(x,y,train_set,nfolds = 10, ntrees = 250, learn_rate = 0.15, max_depth = 7, validation_frame = validate_set,seed = 233, ignore_const_cols = F )
回答:
确保列的类型是正确的,并且被函数所接受。