From fc5827e711a631f242a2da765c5145dec005002c Mon Sep 17 00:00:00 2001 From: klingliu Date: Tue, 29 Jun 2021 16:52:17 -0400 Subject: [PATCH 1/2] Change final output map to display total error --- src/propeller/gp.cljc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/propeller/gp.cljc b/src/propeller/gp.cljc index d85e930..a849a93 100755 --- a/src/propeller/gp.cljc +++ b/src/propeller/gp.cljc @@ -53,10 +53,7 @@ ;; Success on training cases is verified on testing cases (zero? (:total-error best-individual)) (do (println {:success-generation generation}) - ;(print "Checking program on test cases... ") - (if (zero? (:total-error (error-function argmap best-individual :test))) - (println {:test-cases-pass-fail 1}) - (println {:test-cases-pass-fail 0})) + (println {:total-test-error (:total-error (error-function argmap best-individual :test))}) (#?(:clj shutdown-agents)) ) ;; From 51ff11c3621cc48e367b81518703cd0032c47a14 Mon Sep 17 00:00:00 2001 From: klingliu Date: Tue, 29 Jun 2021 17:30:07 -0400 Subject: [PATCH 2/2] Change max-number-magnitude and min-number-magnitude to be more reasonable --- src/propeller/push/utils/globals.cljc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/propeller/push/utils/globals.cljc b/src/propeller/push/utils/globals.cljc index aad494b..93477e2 100644 --- a/src/propeller/push/utils/globals.cljc +++ b/src/propeller/push/utils/globals.cljc @@ -18,10 +18,10 @@ ;; ============================================================================= ;; Used by keep-number-reasonable as the maximum magnitude of any integer/float -(def max-number-magnitude 1.0E12) +(def max-number-magnitude 1.0E6) ;; Used by keep-number-reasonable as the minimum magnitude of any float -(def min-number-magnitude 1.0E-10) +(def min-number-magnitude 1.0E-6) ;; Used by reasonable-string-length? to ensure that strings don't get too large (def max-string-length 1000)