Closed mrshanth closed 7 years ago
This exception means that the value of randomForest$forest$nodepred
attribute is numeric
vector, when it's expected to be integer
vector.
Does this problem go away if you simply change the data type of your target variable accordingly?
mydata$y = as.integer(mydata$y) # this!
rf = randomForest(y ~ ., data = mydata)
r2pmml(rf, "rf.pmml")
If that doesn't do it, then can you provide a reproducible example using some publicly available dataset? Or better yet, can you share your RDS file with me so that I could take a look into it myself?
The prediction variable is factor, as it is a classification exercise.
mydata$y = as.factor(mydata$y)
I cannot provide the data or the RDS file, let me replicate this error with any publicly available dataset
Closing as irreproducible
Hi,
When we tried convert rf.rds to rf.pmml, we got the following error:
Kindly look into this issue.