Significance of Random Seed
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Experts,
I am aware that Random seed helps us to get a deterministic output, but can someone explain what is the significance of the number we enter, and how does it function/evaluates?
Thanks, much!
Solved! Go to Solution.
- Labels:
- Data Investigation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @RahulSharma ,
My understanding of the mechanism is as follows:
1- setting the seed to allow replication of the result. you mentioned that
2- the seed number that you provide will be considered as the initial value used for any further sequence random generation. Setting the number will ensure the consistency of any further sequences of number.
I hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @RahulSharma ,
In order to generate a random sequence of numbers, a computer performs a series
of calculations over a value, which we call the seed.
To generate the first value, a common seed used by computers to perform the calculation is the current datetime, then to generate the second value the previous one will be used as the seed and so on.
When we set a value as the seed we are telling the computer to use it to generate the first value and that´s why we can reproduce the result. The value itself doesn´t mean much. The fact that this same value will always be used to generate the first value is the biggest takeaway.
I hope it helps.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @damc ,
Are you saying if I issue a command set.seed(123), 123 do not mean anything.
If so, I disagree. However, my conclusion is based on the R version of setting the seed.
What do you think?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Not really @ImadZidan ,
We can use choose whatever value we like as the seed.
For instance: set.seed(123), set.seed(42), set.seed(1)... the value itself doesn´t mean much. The fact that this same value will always be used to generate the first value is the biggest takeaway.
Thanks for replying. I´ll edit the previous post to avoid confusion.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @damc
Thanks, much for putting it down.
This kinda answers my question.
Appreciate the help!
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @ImadZidan,
Thank you very much for looking into this.
It is indeed helpful.
I got the context 🙂
