Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

quantregForest setting seed

$
0
0

I am trying to run reproducible results with quantregForest but can't get the same results. Is there a way of setting the seed in this function?

x <- matrix(rnorm(500), ncol = 10)
y <- rnorm(50) 
nodesize = floor(length(y) / 4)
set.seed(71)
a <- quantregForest(x,y, keep.inbag=TRUE,nodesize=nodesize,ntree=2000, nthreads = 1)
b <- quantregForest(x,y, keep.inbag=TRUE,nodesize=nodesize,ntree=2000, nthreads = 1)
testthat::expect_equal(a, b)


a is not equal to b


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>