rodrigo-arenas / Sklearn-genetic-opt

ML hyperparameters tuning and features selection, using evolutionary algorithms.
https://sklearn-genetic-opt.readthedocs.io
MIT License
289 stars 73 forks source link

Add random_state in Space definition #97

Closed rodrigo-arenas closed 2 years ago

rodrigo-arenas commented 2 years ago

Add random_state parameter (default=None) in Continuous, Categorical, and Integer classes from the space definition to leave fixed the random seed during hyperparameters sampling. Take into account that this only ensures that the space components are reproducible, not all the package. This is due to the DEAP dependency, which doesn’t seem to have a native way to set the random seed.

This is due to the request for the issue #94

codecov[bot] commented 2 years ago

Codecov Report

Merging #97 (5b22cf9) into master (086eb59) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #97   +/-   ##
=======================================
  Coverage   98.93%   98.94%           
=======================================
  Files          24       24           
  Lines        1037     1042    +5     
=======================================
+ Hits         1026     1031    +5     
  Misses         11       11           
Impacted Files Coverage Δ
sklearn_genetic/algorithms.py 94.64% <ø> (-0.04%) :arrow_down:
sklearn_genetic/space/space.py 100.00% <100.00%> (ø)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more