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

Max Features in GAFeatureSelectionCV #82

Closed rodrigo-arenas closed 2 years ago

rodrigo-arenas commented 2 years ago

This PR implements the optional parameter max_features, int, default=None. If it's not None, it will penalize individuals with more features than max_features, putting a "soft" upper bound to the number of features to be selected.

It also changes some default parameters to improve the models results.

This is related to the feature request in issue #81

codecov[bot] commented 2 years ago

Codecov Report

Merging #82 (c428d6f) into master (a2c6c29) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #82   +/-   ##
=======================================
  Coverage   99.78%   99.78%           
=======================================
  Files          19       19           
  Lines         919      922    +3     
=======================================
+ Hits          917      920    +3     
  Misses          2        2           
Impacted Files Coverage Δ
sklearn_genetic/_version.py 100.00% <100.00%> (ø)
sklearn_genetic/genetic_search.py 99.70% <100.00%> (+<0.01%) :arrow_up:
sklearn_genetic/plots.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a2c6c29...c428d6f. Read the comment docs.