Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/297.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java H2ODlinearestimator()-预测错误_Java_Python_Glm_H2o - Fatal编程技术网

Java H2ODlinearestimator()-预测错误

Java H2ODlinearestimator()-预测错误,java,python,glm,h2o,Java,Python,Glm,H2o,我正试图使用线性激励函数预测Kaggle comp中的测试时间。模型在3号线正常运行,指标均合理。然而,当我进入预测步骤时,尽管测试数据帧与列车数据帧匹配,我还是得到了一个错误 以前有人见过这个错误吗 h2o_glm = H2OGeneralizedLinearEstimator() h2o_glm.train(training_frame=train_h2o,y='y') h2o_glm_predictions = h2o_glm.predict(test_data=test_h2o

我正试图使用线性激励函数预测Kaggle comp中的测试时间。模型在3号线正常运行,指标均合理。然而,当我进入预测步骤时,尽管测试数据帧与列车数据帧匹配,我还是得到了一个错误

以前有人见过这个错误吗

 h2o_glm = H2OGeneralizedLinearEstimator()

 h2o_glm.train(training_frame=train_h2o,y='y')

 h2o_glm_predictions = h2o_glm.predict(test_data=test_h2o).as_data_frame()

 test_pred = pd.read_csv('test.csv')[['ID']]
 test_pred['y'] = h2o_glm_predictions
 test_pred.to_csv('h2o_glm_predictions.csv',index=False)
glm模型构建进度:|███████████████████████████████████████████████| 100%

glm prediction progress: | (failed)

OSError Traceback (most recent call last) in () 3 h2o_glm.train(training_frame=train_h2o,y='y') 4 ----> 5 h2o_glm_predictions = h2o_glm.predict(test_data=test_h2o).as_data_frame() 6 7 test_pred = pd.read_csv('test.csv')[['ID']]

/Applications/anaconda/lib/python3.6/site-packages/h2o/model/model_base.py in predict(self, test_data) 130 j = H2OJob(h2o.api("POST /4/Predictions/models/%s/frames/%s" % (self.model_id, test_data.frame_id)), 131 self._model_json["algo"] + " prediction") --> 132 j.poll() 133 return h2o.get_frame(j.dest_key) 134

/Applications/anaconda/lib/python3.6/site-packages/h2o/job.py in poll(self) 71 if (isinstance(self.job, dict)) and ("stacktrace" in list(self.job)): 72 raise EnvironmentError("Job with key {} failed with an exception: {}\nstacktrace: " ---> 73 "\n{}".format(self.job_key, self.exception, self.job["stacktrace"])) 74 else: 75 raise EnvironmentError("Job with key %s failed with an exception: %s" % (self.job_key, self.exception))
OSError:具有密钥的作业 $03017F00000132D4FFFFFF$_868312f4c32f683871930a1145c1476a失败 有一个例外:DistributedException from/127.0.0.1:54321:'null', 由java.lang.ArrayIndexOutOfBoundsException stacktrace引起: 来自/127.0.0.1:54321的DistributedException:“null”,由以下原因引起 java.lang.ArrayIndexOutOfBoundsException位于 water.MRTask.getResult(MRTask.java:478)位于 water.MRTask.getResult(MRTask.java:486)位于 water.MRTask.doAll(MRTask.java:390)位于 water.MRTask.doAll(MRTask.java:396)位于 hex.glm.GLMModel.predictScoreImpl(GLMModel.java:1215)位于 hex.Model.score(Model.java:1077)位于 ModelMetricsHandler$1.compute2(ModelMetricsHandler.java:351) at water.H2O$H2OCountedCompleter.compute(H2O.java:1349)at jsr166y.CountedCompleter.exec(CountedCompleter.java:468)位于 jsr16y.ForkJoinTask.doExec(ForkJoinTask.java:263)位于 jsr16y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:974)位于 jsr16y.ForkJoinPool.runWorker(ForkJoinPool.java:1477)位于 jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)导致 by:java.lang.ArrayIndexOutOfBoundsException


为了总结上面的评论,当前的解决方案是在
test_data
框架中添加一个响应列(如果不存在,则使用假数据)。但是,这是一个应该修复的bug。JIRA是。

这看起来和我在这里发布的错误一样:作为一种解决方法,尝试添加一个假响应列(例如,添加一个常量列“y”来测试_数据),这很快就奏效了-谢谢!希望这个错误在以后的更新中得到修复。谢谢你告诉我这是哪个版本的H2O,这样我就可以在bug报告中跟踪它了?Thx。它是H2O版本3.12.0.1。当我尝试使用H2o xgboost估计器执行网格搜索时,H2o 3.12.0.1中的xgboost也有问题。这是一个已知的问题吗?ThanksI可以确认这个bug也存在于R(h2o 3.10.3.3和3.12.0.1)中,并且它似乎不是GLM特定的,而是与显式的热编码有关-参见我在评论中链接的问题。