DEAP / deap

Distributed Evolutionary Algorithms in Python
http://deap.readthedocs.org/
GNU Lesser General Public License v3.0
5.79k stars 1.12k forks source link

question about kfold #734

Open cghsncg opened 9 months ago

cghsncg commented 9 months ago

I'm using kfold for accuracy verification, but I have some questions My code is as follows kf = KFold(n_splits=5, shuffle=True, random_state=42) for train_id, test_id in kf.split(points): toolsbox.register("evaluate", model, points=train_points) Each time I used toolsbox.register("evaluate", model, points=train_points) code to re-register his evaluation function, and I want to know if this works ?

Another question I have is whether individuals in the different folds mentioned above can cross-mutate, i.e., can individuals from two populations that differ only in the way the fitness function is computed cross-mutate in deap, and does the way the fitness function is computed have any effect on the cross-mutations of separate individuals?