Re: About HW7

作者: untitled (Causality)   2005-04-28 21:13:06
※ 引述《Tonnny (^~^)》之銘言:
: In the randomForest reference manual, the example of function randomForest
: has the code as follows:
: set.seed(71)
: iris.rf <- randomForest(Species ~ ., data=iris, importance=TRUE,
: proximity=TRUE)
: What is the function of set.seed(71) before run the randomForest?
As the name suggest, it specifies "seed" when generating random numbers.
With the same seed, the same random number will be generated.
You can try to run this:
runif(1) #random number from uniform distribution
runif(1)
set.seed(1)
runif(1)
set.seed(1)
runif(1)

Links booklink

Contact Us: admin [ a t ] ucptt.com