r2pmml问题 [英] Problems with r2pmml

查看:103
本文介绍了r2pmml问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在R中安装了软件包r2pmml及其所有依赖项.但是,当我尝试将gbm模型对象转换为pmml时,会引发此错误:

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

在Java方面,我是菜鸟,对您的任何帮助,我们深表感谢!

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

推荐答案

您正在使用过时的Java版本,该版本

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.

要调试rJava配置,请执行以下R脚本:

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)

请注意java.home属性的值.它必须指向最新的Java安装.

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

这篇关于r2pmml问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆