scipy-lectures / scientific-python-lectures

Tutorial material on the scientific Python ecosystem
https://lectures.scientific-python.org
Other
3.08k stars 1.19k forks source link

Set random state when splitting data to update scikit-learn #762

Closed thomasjpfan closed 2 months ago

thomasjpfan commented 2 months ago

Fixes the issue seen in https://github.com/scipy-lectures/scientific-python-lectures/pull/761

To make train_test_split deterministic, we need to set the random_state.

thomasjpfan commented 2 months ago

@jarrodmillman Can you approve this workflow to see if this PR fixes the original issue?

betatim commented 2 months ago

Test failure seems to be due to timeouts when trying to download datasets. Might go away if the test is restarted, but seem unrelated to the changes here.