diff --git a/src/propeller/problems/regression/integer_regression.cljc b/src/propeller/problems/regression/integer_regression.cljc index a3fbb54..193cbb1 100644 --- a/src/propeller/problems/regression/integer_regression.cljc +++ b/src/propeller/problems/regression/integer_regression.cljc @@ -62,6 +62,21 @@ :total-error #?(:clj (apply +' errors) :cljs (apply + errors)))))) +(def integer-argmap + {:instructions instructions + :error-function error-function + :training-data (:train train-and-test-data) + :testing-data (:test train-and-test-data) + :max-generations 300 + :population-size 1000 + :max-initial-plushy-size 5 + :step-limit 200 + :parent-selection :lexicase + :tournament-size 5 + :umad-rate 0.1 + :variation {:umad 1.0 :crossover 0.0} + :elitism false}) + (defn -main "Runs the top-level genetic programming function, giving it a map of arguments with defaults that can be overridden from the command line @@ -69,17 +84,5 @@ [& args] (gp/gp (merge - {:instructions instructions - :error-function error-function - :training-data (:train train-and-test-data) - :testing-data (:test train-and-test-data) - :max-generations 300 - :population-size 1000 - :max-initial-plushy-size 100 - :step-limit 200 - :parent-selection :lexicase - :tournament-size 5 - :umad-rate 0.1 - :variation {:umad 1.0 :crossover 0.0} - :elitism false} - (apply hash-map (map #(if (string? %) (read-string %) %) args))))) + integer-argmap + (apply hash-map (map #(if (string? %) (read-string %) %) args)))))