I am writing the code for cross validation of my models' performance.In order to split data set randomly I use this method:
h2o.runif(train.hex)
Unfortunately it always returns me the same vector:
0.7309678 0.2405364 0.6374174 0.5504370 0.5975453 0.3332184
I've also tried to use different seeds e.g.:
h2o.runif(train.hex, seed=-1)
h2o.runif(train.hex, seed=123)
the results are always the same. What is wrong with function? I would appreciate for any hint on it.
UPDATE
Here is a full code:
library(h2o)
localH2O <- h2o.init(nthreads = -1,max_mem_size = '7g')
data(iris)
iris.hex<- as.h2o(localH2O,iris)
random <- h2o.runif(iris.hex, seed=-1)
print(random)
I can't reproduce the problem.
Produces:
However, if I run it again, it produces something different (as expected):