luca-scr / GA

An R package for optimization using genetic algorithms
http://luca-scr.github.io/GA/
91 stars 29 forks source link

Add ability to call fitness function in batch (e.g. once for all children in a population) #60

Open linanqiu opened 2 years ago

linanqiu commented 2 years ago

Often the fixed cost of calling the fitness function is high while the variable cost is low, especially in ML applications. e.g. calling predict on xgboost for 100 rows takes X seconds, but 100,000 rows takes around 5X seconds. I'm adding an option that allows users to write a batch fitness function and expect the entire population at once.