Error while using predict function on extraTrees (R)


When I use predict function on extraTrees object I get following error -

Error in .jcall(et$jobject, “[D”, “getValues”, toJavaMatrix2D(newdata)) : _
_ java.lang.NullPointerException

anyone has a way to resolve this ?

my model:

model_exTree_500 <- extraTrees(as.matrix(train[,features_exT]),as.factor(train$PredCol),
mtry = sqrt(ncol(train))

Predict function:
pred_exTree <- predict(model_exTree_500, as.matrix(test[,features_exT]))


Hi @sadashivb, are there missing values (NANs) in your data?


I have verified. There are no NAN in the data



FYI Pls,

the above error got resolved after I added:

options( java.parameters = “-Xmx2g” )

It was my bad. This was mentioned in the R documents, but I had missed

Thanks @jalFaizy for your time.