H2o超级学习者和分位数估计

时间:2018-08-19 23:13:48

标签: r h2o

我可以在h2o中运行一个估计分位数的超级学习器吗?

我的R代码如下:

library(h2o)
h2o.init()
h2o_data_estimation <- h2o.importFile(path="http://mldata.org/repository/data/download/csv/book-evaluation-complete")



neuralnet_h2o_quantile<-h2o.deeplearning(y="C1",
                                     model_id="neuralnet_h2o_quantile",        training_frame=h2o_data_estimation,nfolds=3,                  
                                     fold_assignment="Modulo",distribution="quantile", quantile_alpha=0.25,keep_cross_validation_predictions = TRUE)

gbm_h2o_quantile<-h2o.gbm(y="C1",model_id="gbm_h2o_quantile",
                      training_frame=h2o_data_estimation,nfolds=3,fold_assignment="Modulo",distribution="quantile", quantile_alpha=0.25,keep_cross_validation_predictions = TRUE)

ensemble_h2o_quantile2<-h2o.stackedEnsemble(y="C1",model_id="ensemble_h2o_quantile2",
                                       base_models=list("neuralnet_h2o_quantile","gbm_h2o_quantile"),
                                       training_frame=h2o_data_estimation,metalearner_algorithm ="deeplearning",metalearner_nfolds=3, 
                                       metalearner_params=list(hidden=10,distribution="quantile",quantile_alpha=0.25),metalearner_fold_assignment="Modulo")

我得到的错误是

java.lang.AssertionError

java.lang.AssertionError
at hex.Distribution.<init>(Distribution.java:17)
at       hex.StackedEnsembleModel.checkAndInheritModelProperties(StackedEnsembleModel.java:365)
at hex.ensemble.StackedEnsemble$StackedEnsembleDriver.computeImpl(StackedEnsemble.java:234)
at hex.ModelBuilder$Driver.compute2(ModelBuilder.java:214)
at water.H2O$H2OCountedCompleter.compute(H2O.java:1260)
at jsr166y.CountedCompleter.exec(CountedCompleter.java:468)
at jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:263)
at jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:974)
at jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1477)
at jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)

有人可以帮忙吗?

进一步的测试表明,将分位数估计器引入基础深度学习算法后,堆叠的集成学习器就会失败并产生上述错误。

0 个答案:

没有答案