Linked Questions

16
votes
1answer
7k views

If so many people use set.seed(123) doesn't that affect randomness of world's reporting? [duplicate]

It seems like everyone just uses set.seed(123) or set.seed(1234) when they are doing random sampling. If so many people use ...
0
votes
1answer
15k views

Choosing a value for random_state argument in scikit-learn linear regression [duplicate]

A value of 324 is provided without explanation in a linear regression tutorial that I'm following. I checked to see if this was the number of samples, but they did not match. Edit: My apologies for ...
0
votes
1answer
52 views

Why a lot of people use random.seed() at the beginning of their python code [duplicate]

A lot of people use random.seed() at the beginning of their python code in training a machine learning model. As I understand they want to control the randomness therefore they can compare different ...
64
votes
5answers
4k views

Why does collecting data until finding a significant result increase Type I error rate?

I was wondering exactly why collecting data until a significant result (e.g., $p \lt .05$) is obtained (i.e., p-hacking) increases the Type I error rate? I would also highly appreciate an ...
5
votes
2answers
8k views

Choosing the “Correct” Seed for Reproducible Research/Results

I have created this post to spark a discussion around an idea I had regarding the choice of the seed number used to replicate the results of a statistical model. Here is some background on how I came ...
5
votes
1answer
2k views

Why does changing random seeds alter results?

I'm running some SVMs for a seminar and a friend of mine noted I should set a seed so my results don't change everytime I run the code. I was wondering why is that the case. If a different seed can ...
5
votes
1answer
1k views

Is there such a thing as a “good/bad” seed in pseudo-random number generation?

Well, I don't really have much to add to the title. I tend not to use seeds in preudo-random number generation, but they are handy when an initial research project that includes simulations expands to ...
4
votes
1answer
908 views

Performance of Ridge and Lasso Regression depend on set.seed?

I try to do a ridge and lasso regression for out of sample predictions. The optimal lambda is chosed via cross validation. I run my results for different seeds in R. And depending on the seed i get a ...
0
votes
3answers
287 views

Why do we do hypothesis testing on estimates of linear regression?

I was reading about linear regression and what I understood is that once we minimize OLS equation we get the beta parameters. Its just like solving a normal equation to get the unknowns. Then why do ...
4
votes
0answers
100 views

an alternative allocation method for small RCTs?

stratification and minimization are two randomization options to achieve balance in terms of covariates or baselines in small RCTs. in recent years, researchers seem to have favoured minimization, ...
0
votes
0answers
79 views

Do you have to set.seed when splitting data?

More specifically, in cases of bootstrap and cross-validation, we often tend to put a set.seed() randomly, either a number people like or more often 12 or 123. This ...