1

我正在尝试构建 3 个模型的集合,即......深度学习、随机森林和梯度提升。我已将模型 id 作为列表传递给 ensemble 函数,但出现以下错误:

java.lang.NullPointerException

 java.lang.NullPointerException
     at hex.StackedEnsembleModel.checkAndInheritModelProperties(StackedEnsembleModel.java:258)
     at hex.ensemble.StackedEnsemble$StackedEnsembleDriver.computeImpl(StackedEnsemble.java:116)
     at hex.ModelBuilder$Driver.compute2(ModelBuilder.java:169)
     at water.H2O$H2OCountedCompleter.compute(H2O.java:1241)
     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)

 Error: java.lang.NullPointerException

这是我对集成模型的论点:

my_ensemble <- h2o.stackedEnsemble(x=2:length(names(train)),y=1,
              training_frame = train,validation_frame = valid,
              base_models = list(ann1@model_id,rf1@model_id,
               gbm1@model_id),model_id = "my_ensemble_1")

请告知我哪里出错了。

注意:我正在尝试预测多项式分类。

4

1 回答 1

0

H2O Stacked Ensemble尚不支持多项分类——仅支持回归和二元分类。这在Stacked Ensemble 文档中有所说明。这就是它失败的原因。

于 2017-05-03T03:00:37.290 回答