EpistasisLab / tpot

A Python Automated Machine Learning tool that optimizes machine learning pipelines using genetic programming.
http://epistasislab.github.io/tpot/
GNU Lesser General Public License v3.0
9.58k stars 1.55k forks source link

Not deterministic with random_state=0 #1291

Closed steffen-limmer closed 9 months ago

steffen-limmer commented 1 year ago

TPOT is not deterministic with random_state=0. The reason is that in the _compile_to_sklearn function it is checked whether random_state is set with the statement "if self.random_state". This evaluates to False for random_state=0 and should be replaced with "if self.random_state is not None".