Example of use of "random jungle" in 'R'

698 Views Asked by At

I'm trying to build an rjungle model based on an example, but I'm getting an error when I try to use the model for a prediction.

Here is where I got the package:

Install code:

library(devtools)
install_github("Rjungle", username = "jkruppa")

Here's my code to try and run it against iris data:

#get data
data(iris)

#prove data is in workspace
plot(iris)

#try to make jungle (warning comes from this, but not error)
est <- rjungle(depVarName = "Species", 
               data=iris,
               ntree=200,verbose = T)

#something comes out
summary(est)

mypred <- predict(object = est,data = iris) # ERROR is here

What I got:

Though it is very simple code, it should work according to the help doc. Instead I get this, which I don't know how to understand.

Warning message:
running command 'C:/Program Files/Microsoft/MRO-3.3.2/library/Rjungle/exec/rjungle -f C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc072c842f1 -D Species -y 1 -o C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc0283e422a -t 200 -m 0 -z 123 -i 1 -U 0 -u  -w2  -v ' had status 127 

There is something in "est" so I try to "predict" using it, and get the following error:

Error in file(file, "r") : cannot open the connection
In addition: Warning messages:
1: running command 'C:/Program Files/Microsoft/MRO-3.3.2/library/Rjungle/exec/rjungle -f C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc01bc674e5 -D Species -y 1 -o C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc018645dc2 -t 200 -m 0 -z 123 -i 1 -U 0 -u  -w2  -v ' had status 127 
2: running command 'C:/Program Files/Microsoft/MRO-3.3.2/library/Rjungle/exec/rjungle -f C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc02b6e396e -D Species -y 1 -o C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc0529c3e47 -P C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc018645dc2.jungle.xml -v' had status 127 
3: In file.show(paste(rjPred@tmpFile, ".confusion", sep = ""), pager = "cat") :
  file.show(): file 'C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc0529c3e47.confusion' does not exist
4: In file(file, "r") :
  cannot open file 'C:\Users\mrmunroe\AppData\Local\Temp\RtmpUBMImO\rjungledata3cc0529c3e47.prediction': No such file or directory 
0

There are 0 best solutions below