Closed Clls1 closed 5 years ago
java.lang.IllegalArgumentException: other at org.jpmml.rexp.RExpUtil.getDataType(RExpUtil.java:46)
It means that the JPMML-R library is unable to figure out the data type (what is the PMML equivalent of R's other
data type) of one or more columns.
I believe that it's related to the fact that you're performing "cast to factor" operations inside the R formula:
rf <- randomForest(as.factor(fraude) ~ Total_Saldo_A + as.factor(Tem_Modelo_Equipo), data = segmentacao_out_model)
Does the conversion succeed, if you perform those cast operations before the randomForest()
function call? For example:
segmentacao_out_model$fraude = as.factor(segmentacao_out_model$fraude)
segmentacao_out_model$Tem_Modelo_Equipo = as.factor(segmentacao_out_model$Tem_Modelo_Equipo)
rf <- randomForest(fraude ~ Total_Saldo_A + Tem_Modelo_Equipo, data = segmentacao_out_model)
Thanks to your tip I discovered the problem. The thing was that one of the variables was of the type difftime, I converted to numeric and it worked! Thank you so much! Please continue the great work!
The thing was that one of the variables was of the type difftime
Can you provide a reproducible example about using difftime
?
The PMML standard provides first-class date/time data types, and is able to do arithmetic with them (eg. calculating the number of days between two dates, the number of seconds between two timestamps etc.). Would be very interested in prototyping something in this area.
Hello,
I have run a randomForest however I am not able to extract the pmml. What could be the issue? Thank you so much
Error: