A random-seed is used to initialize a pseudo-random number generator in many programming languages.
Questions tagged [random-seed]
937 questions
-1
votes
1 answer
How to get "default" random object (or seed) in Java?
I know that I can create Random object and set seed for the object like this:
Random random = new Random();
random.setSeed(seed);
But what if I can't create Random object? What if I have to use Math.random()?
I know that Math.random() creates…

chaika_sv
- 384
- 1
- 4
- 16
-1
votes
2 answers
why does every time I run parameter correction I get a different result
I am a newbie in machine learning, can anyone explain to me why every time I run the model and tune hyperparameters, I use RandomSearch, when I get good parameters and apply them, it gets a good result. But when I run it all again, in tunning…

Thanh
- 1
-1
votes
1 answer
How to ensure reproducibility of nlme() function calls?
I recently began using the R package {nlme} to fit non-linear mixed-effects models with random effects. I have discovered that running exactly the same nlme() function call (i.e., the same line of code: same data, model, and starting parameters)…

Dan K.
- 19
- 3
-1
votes
2 answers
Why in CPP in some system the RAND_MAX is set to 32K while in others it is 2147483647
In my CPP system whenever I generate a random number using rand() I always get a value between 0-32k while in some online videos and codes it is generating a value between 0-INT_MAX. I know it is dependent on RAND_MAX. So it there some way to change…

Kritik Manral
- 11
- 1
-1
votes
1 answer
Different seeds lead to extremely different results with modified U-Net
I am using a modified U-Net architecture to perform auto-segmentation on a dataset of biomedical images. Although I have achieved some decent results, I have noticed that the training of the model is highly dependent on the seed that I set at the…

px3791
- 1
- 1
-1
votes
1 answer
Sympy changes the random seed
I am working on a python 3 project where I use deap and sympy.
I set the seed to a fixed value after I imported the random module in the main file.py that I execute in order to have a reproductible code. but then I found out that I do not obtain the…

AnassBou
- 21
- 4
-1
votes
2 answers
Are LSB bits less random? how does it work? And what is the best LCG implementation for rand written in C?
I recently read somewhere that values with less significant bits tend to be less random than with more significant bits, could someone explain this better? If you can pass me some paper that talks about this and about random numbers I would be very…

Yuri Bittencourt
- 91
- 8
-1
votes
2 answers
How to make random.choice in a for loop give the same output every time
I am reusing a code written by someone else. It has the following line included:
df = (random.choice(x) for i in repeat(0))
However, because there is no random.seed, the output is different every time I rerun it, which makes sense.
I tried to fix…

Leo
- 135
- 10
-1
votes
1 answer
What kind of PRNG would match such scatter plots?
I've been given the challenge to find the seed from a series of pseudo-randomly generated alphanumerical IDs and after some analysis, I'm stuck in a dead end that I hope you'll be able to get me out of.
Each ID is obtained by passing the previous…

Paul
- 3
- 6
-1
votes
1 answer
How do I handle variability of output in Anylogic?
I have been working on a simulation model for battery swapping in Anylogic. So far I have developed the simulation model, optimization experiment and parameters variation experiment.
There are no errors in the model but the output values are…

Abhinav saini
- 1
- 1
-1
votes
2 answers
Inconsistent replication of numpy random generator using random.RandomState(None) or 0
I have had this problem before. At the time, I imported random a number of times.
This time I import numpy a single time among all modules.
EDITED
Using None might have been the problem. But still not working with 0.
Minimal example working, so it's…

B Furtado
- 1,488
- 3
- 20
- 34
-1
votes
1 answer
can machine generate truly random numbers?
I know that for most programs, a pseudo-random number is sufficient but there are ways that machines can generate truly random numbers. For example, devices that generate unpredictable processes. But, they tend to be biased somehow. So, is it…

Monther
- 3
- 3
-1
votes
1 answer
Is it cheating to change the random state for test-train split to get the best r2 score?
I notice that my r2 score (for the test set) changes significantly when I play around with the random state for a linear regression model. The scores can change orders of magnitude - fluctuating between -10^4 to 0.97. While the performance is…

vineeth venugopal
- 1,064
- 1
- 9
- 17
-1
votes
1 answer
Why dont I get random numbers?
I am wondering why I wont get random numbers. My code is a game in which you roll a dice and then depending on the number you add oder remove smth. That works so far! Now i want to simulate this game like 100 times. But here I always get the same…

corken
- 19
- 6
-1
votes
1 answer
BigQuery RAND() not accepting seed value
I am trying to using the RAND() function and set a seed to generate a consistent set of 10 random values in my output following https://cloud.google.com/dataprep/docs/html/RAND-Function_57344757#int_value
With this query I am getting the error: No…

Pdavis327
- 101
- 3