Problems with r2pmml

北战南征 提交于 2019-12-08 06:15:30

问题


I recently installed package r2pmml and all its dependencies in R. However, when I'm trying to convert my gbm model object to pmml it throws this error:

r2pmml::r2pmml(model,"model.pmml")

Error in .jnew("org/jpmml/rexp/Main") : 
java.lang.UnsupportedClassVersionError: org/jpmml/rexp/Main : Unsupported major.minor version 51.0

I'm a noob when it comes to java and any help is appreciated!


回答1:


You are using an outdated Java version, which does not support Java 1.7 class files - please upgrade. The requirement for Java 1.7 is also stated in r2pmml's README file.

To debug your rJava configuration, please execute the following R script:

library("rJava")
.jinit()
props = .jcall("java/lang/System", "Ljava/util/Properties;", "getProperties")
out = .jfield("java/lang/System", "Ljava/io/PrintStream;", "out")
.jcall(props, "V", "list", out)

Please observe the value of the java.home property. It must point to a up-to-date Java installation.



来源:https://stackoverflow.com/questions/33882019/problems-with-r2pmml

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!