if I choose 0, each time I run the workflow, the training and validation data set should be different, but the attached workflow shows the same results. Likewise, if I choose a number other than 0, each time I run the workflow, the training and validation dataset should be the same, but the attached workflow shows the same results. can you please advise?
Solved! Go to Solution.
Hey @Gualigee,
I've tried the attached workflow and It generates the same validation and training sets each time for me. Were you saying that this workflow wasn't doing this for you?
hi@IraWatt, my question is if i set the seed=0, each time you run the workflow, you should get a different validation and training sets. but actually, we don't, right? I wonder why this is. Thanks.
If you set the seed manually to a static number - your training and test data sets will be the same each time.
Hi @apathetichell, if i set the seed manually to 0, the training and test data sets will be different each time, right? But mine is the same,
No - if you set a seed you will get the same dataset after it is run - see the link I sent.
Run again the previous example where we sampled five random numbers from a Normal distribution, but now specify a seed before:
# Specify any integer set.seed(1) rnorm(5) # -0.6264538 0.1836433 -0.8356286 1.5952808 0.3295078
If you execute the previous code, you will obtain the same output. However, note that if you run rnorm(5) twice, it gives different results:'
in the context of "twice" this would mean executing the random seed twice in an R tool which cannot be done out of the box in Alteryx.
Thank you for your clarification, @apathetichell
then what is the difference of setting the reed=1 and =3, I did see the results are different. but what is the purpose of setting a different number? Thank you.
the difference is setting a seed vs not setting a seed - if you are setting a seed - you can choose any number there - but if you are troubleshooting or want a static dataset or want to collaborate with your team on the same data - communication of what the seed you are setting is key.
setseed(1) is different than setseed(2) - but the differences don't matter. your model should be as effective (basically) vs either seed. If not you have a model problem not a seed problem.
Thank you for your classification. @apathetichell
wrong thread!