Update valiant for new problem specification scheme
This commit is contained in:
parent
94d4b9d43a
commit
1698c51194
@ -34,11 +34,8 @@
|
|||||||
])))))
|
])))))
|
||||||
|
|
||||||
(defn error-function
|
(defn error-function
|
||||||
([argmap individual]
|
[argmap data individual]
|
||||||
(error-function argmap individual :train))
|
|
||||||
([argmap individual subset]
|
|
||||||
(let [program (genome/plushy->push (:plushy individual) argmap)
|
(let [program (genome/plushy->push (:plushy individual) argmap)
|
||||||
data (get train-and-test-data subset)
|
|
||||||
inputs (:inputs data)
|
inputs (:inputs data)
|
||||||
correct-outputs (:outputs data)
|
correct-outputs (:outputs data)
|
||||||
outputs (map (fn [input]
|
outputs (map (fn [input]
|
||||||
@ -59,4 +56,10 @@
|
|||||||
:behaviors outputs
|
:behaviors outputs
|
||||||
:errors errors
|
:errors errors
|
||||||
:total-error #?(:clj (apply +' errors)
|
:total-error #?(:clj (apply +' errors)
|
||||||
:cljs (apply + errors))))))
|
:cljs (apply + errors)))))
|
||||||
|
|
||||||
|
(def arglist
|
||||||
|
{:instructions instructions
|
||||||
|
:error-function error-function
|
||||||
|
:training-data (:train train-and-test-data)
|
||||||
|
:testing-data (:test train-and-test-data)})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user