I followed this example:
https://www.2021.ai/randsharkmachinelearning/
when executing this command on R:
sharkFit <- SharkRFTrain(X, Y, nTrees = 100)
I get:
Error in SharkRFTrain(X, Y, nTrees = 100) : Should not call this. Fix the random numbers generator if you need this. 478
This exception is thrown from this cpp line:
trainer.train(model, trainData);
I suspect the reason is written here:
https://github.com/aydindemircioglu/RcppShark#notes
The random number generator has been replaced since R packets should use a random generator from R, and not internal C / C ++. Thus, a direct comparison of the results of algorithms that depend on (pseudo) random numbers cannot be performed.
Is there any way to mitigate this?
tried both versions of R: 3.4.1, 3.3.2
source share