-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TrainTestSplit random seed #1635
Comments
Hi @petterton - in ML.NET, the seed is set at the environment level. You can set and change the seed when you create the Does that answer your question? |
Hi @najeeb-kazmi , I was wondering if that was the case, but changing the seed when creating |
Actually, I was wrong about the seed in @Zruty0 any thoughts on how we can get this in? Currently, we are using @petterton if you are trying to get different splits for doing cross validation specifically, you can use the |
Yep, it's a bug. We need to make |
@Zruty0 : Will this be fixed in 0.8? (Not assigned to a milestone yet...) |
@Ivanidzo4ka , @Zruty0 : I tested this in v0.9, and this still does not work as I expected. If I don't set a |
The usage of seeds seems to be unclear still in v0.9. I think in some workflows, if the Context seed is provided, you are probably going for deterministic outcomes for testing. However, if the Context seed isn't provided, you are probably doing a real training. It doesn't seem that the Context seed has any effect on the Split. In some cases, you might have a need to call split multiple times, which of course probably provide a seed. But if you load, split and train with a null Context, shouldn't we expect a different Split outcome? |
I am repeatedly calling
TrainTestSplit
for a data set (for cross validation) and see that the resulting split is the same every call. In sklearn, thetrain_test_split
function has the possibility of taking a seed for a random number generator as an input. Could this be added also in ML.NET?The text was updated successfully, but these errors were encountered: