From 1cdf6f5640416f47cdbb71151549c2ae6fe83d3c Mon Sep 17 00:00:00 2001 From: Ryan Boldi Date: Tue, 8 Nov 2022 15:48:12 -0500 Subject: [PATCH] account for generation interval in eval counting --- src/propeller/gp.cljc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/propeller/gp.cljc b/src/propeller/gp.cljc index 2e36c9d..7ed61ea 100644 --- a/src/propeller/gp.cljc +++ b/src/propeller/gp.cljc @@ -107,7 +107,7 @@ ;; :else (recur (inc generation) (+ evaluations (* population-size (count training-data)) ;every member evaluated on the downsample - (* (count parent-reps) (- (count indexed-training-data) (count training-data))) ; the parent-reps not evaluted already on down-sample + (if (zero? (mod generation ds-parent-gens)) (* (count parent-reps) (- (count indexed-training-data) (count training-data))) 0) ; the parent-reps not evaluted already on down-sample (if best-individual-passes-ds (- (count indexed-training-data) (count training-data)) 0)) ; if we checked for generalization or not (let [reindexed-pop (hyperselection/reindex-pop ds-evaluated-pop)] (if (:elitism argmap)