When I'm trying to convert random forest model in r with some categorical variables with more than 32 levels, r gives the following information.
r2pmml(rf1, "rf.pmml")
Aug 19, 2015 2:36:22 PM org.jpmml.converter.Main run
INFO: Parsing ProtoBuf..
Aug 19, 2015 2:36:22 PM org.jpmml.converter.Main run
INFO: Parsed ProtoBuf in 131 ms.
Aug 19, 2015 2:36:22 PM org.jpmml.converter.Main run
INFO: Converting model..
Aug 19, 2015 2:36:22 PM org.jpmml.converter.Main run
SEVERE: Failed to convert model
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalArgumentException
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2203)
at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4830)
at org.jpmml.converter.RandomForestConverter.encodeNode(RandomForestConverter.java:396)
at org.jpmml.converter.RandomForestConverter.encodeNode(RandomForestConverter.java:420)
at org.jpmml.converter.RandomForestConverter.encodeNode(RandomForestConverter.java:420)
at org.jpmml.converter.RandomForestConverter.encodeNode(RandomForestConverter.java:420)
at org.jpmml.converter.RandomForestConverter.encodeTreeModel(RandomForestConverter.java:360)
at org.jpmml.converter.RandomForestConverter.convertClassification(RandomForestConverter.java:208)
at org.jpmml.converter.RandomForestConverter.convert(RandomForestConverter.java:116)
at org.jpmml.converter.Main.run(Main.java:124)
Caused by: java.lang.IllegalArgumentException
at org.jpmml.converter.RandomForestConverter.performBinaryExpansion(RandomForestConverter.java:544)
at org.jpmml.converter.RandomForestConverter.selectValues(RandomForestConverter.java:515)
at org.jpmml.converter.RandomForestConverter.encodeCategoricalSplit(RandomForestConverter.java:438)
at org.jpmml.converter.RandomForestConverter.access$000(RandomForestConverter.java:51)
at org.jpmml.converter.RandomForestConverter$1.load(RandomForestConverter.java:62)
at org.jpmml.converter.RandomForestConverter$1.load(RandomForestConverter.java:56)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
... 12 more
Error in .convert(tempfile, file, converter) :
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalArgumentException
I think this is because randomForest now supports up to 53 factor levels while r2pmml stays to 32. It would be appreciated if the r2pmml package would be updated. Thank you.
When I'm trying to convert random forest model in r with some categorical variables with more than 32 levels, r gives the following information.
I think this is because randomForest now supports up to 53 factor levels while r2pmml stays to 32. It would be appreciated if the r2pmml package would be updated. Thank you.