kstaats / karoo_gp

A Genetic Programming platform for Python with TensorFlow for wicked-fast CPU and GPU support.
Other
157 stars 61 forks source link

Pass the seed to sklearn.model_selection.train_test_split. #60

Closed ezio-melotti closed 2 years ago

ezio-melotti commented 2 years ago

This is a follow-up of #56. I verified that by passing the seed to sklearn.model_selection.train_test_split the test results are consistent even when np.random.seed is not initialized. I left its initialization just in case, with an updated comment.

I also tried to pass the rng directly, but got this error: ValueError: Generator(PCG64) at 0x7F1758766A40 cannot be used to seed a numpy.random.RandomState instance.