DEAP / deap

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

question about kfold #734

Open cghsncg opened 11 months ago

cghsncg commented 11 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?