Using a decision tree or a linear model throws an illegal argument exception. When I use jpmml-r directly I get the same errors.
Decision tree example:
library(tree)
model <- tree(Species ~ Sepal.Width + Petal.Width, data = iris)
library(r2pmml)
r2pmml(model, "tree.pmml")
Oct 08, 2015 12:44:45 PM org.jpmml.rexp.Main run
INFO: Parsing ProtoBuf..
Oct 08, 2015 12:44:45 PM org.jpmml.rexp.Main run
INFO: Parsed ProtoBuf in 47 ms.
Oct 08, 2015 12:44:45 PM org.jpmml.rexp.Main run
INFO: Initializing default Converter
Error in .convert(tempfile, file, converter) :
java.lang.IllegalArgumentException
Linear regression:
cuse <- read.table("http://data.princeton.edu/wws509/datasets/cuse.dat", header=TRUE)
attach(cuse)
model <- glm( cbind(using, notUsing) ~ age + education + wantsMore , family = binomial)
library(r2pmml)
r2pmml(model, "glm.pmml")
Oct 08, 2015 12:55:42 PM org.jpmml.rexp.Main run
INFO: Parsing ProtoBuf..
Oct 08, 2015 12:55:42 PM org.jpmml.rexp.Main run
INFO: Parsed ProtoBuf in 41 ms.
Oct 08, 2015 12:55:42 PM org.jpmml.rexp.Main run
INFO: Initializing default Converter
Error in .convert(tempfile, file, converter) :
java.lang.IllegalArgumentException
Help appreciated. Cheers!
Ben.
gbm, train)INFO: Parsing ProtoBuf.. Oct 09, 2015 4:12:34 PM org.jpmml.rexp.Main run INFO: Parsed ProtoBuf in 9 ms. Oct 09, 2015 4:12:34 PM org.jpmml.rexp.Main run INFO: Initializing default Converter Oct 09, 2015 4:12:34 PM org.jpmml.rexp.Main run INFO: Initialized org.jpmml.rexp.TrainConverter Oct 09, 2015 4:12:34 PM org.jpmml.rexp.Main run INFO: Converting model.. Oct 09, 2015 4:12:34 PM org.jpmml.rexp.Main run SEVERE: Failed to convert model java.lang.IllegalArgumentException at org.jpmml.rexp.ConverterFactory.newConverter(ConverterFactory.java:46) at org.jpmml.rexp.TrainConverter.convert(TrainConverter.java:31) at org.jpmml.rexp.Main.run(Main.java:146)
Error in .convert(tempfile, file, converter) :
java.lang.IllegalArgumentException
----