How to use set.seed()

seed

#1

How do we decide how much seeds to specify while using it in various algorithms


#2

@crisis1.08

You don’t decide. Seed value can be any Integer you desire. Seed value is choosen so that the random number generated by the computer can be generated again in case we wish to reproduce the proceedings or the results obtained.

Hope this helps.

Regards,
Neeraj


#3

@crisis1.08

Let us say that you are doing a simulation for comparing two different algorithms and you want to create random data sets

If you choose the number of sets to be 1000,for each iteration , you can use seeds from 1 to 1000

set.seed(1)
perform simulation
set.seed(2)
perform simulation

@NSS has already explained that with seeds you can reproduce the exact same data for comparison’s sake