Update fuel_cost.cljc
This commit is contained in:
parent
6f152a0357
commit
b5953d3779
@ -2,6 +2,7 @@
|
|||||||
(:require [psb2.core :as psb2]
|
(:require [psb2.core :as psb2]
|
||||||
[propeller.genome :as genome]
|
[propeller.genome :as genome]
|
||||||
[propeller.push.interpreter :as interpreter]
|
[propeller.push.interpreter :as interpreter]
|
||||||
|
[propeller.problems.data-creation :as dc]
|
||||||
[propeller.utils :as utils]
|
[propeller.utils :as utils]
|
||||||
[propeller.push.instructions :refer [get-stack-instructions]]
|
[propeller.push.instructions :refer [get-stack-instructions]]
|
||||||
[propeller.push.state :as state]
|
[propeller.push.state :as state]
|
||||||
@ -19,7 +20,8 @@
|
|||||||
; Source: https://arxiv.org/pdf/2106.06086.pdf
|
; Source: https://arxiv.org/pdf/2106.06086.pdf
|
||||||
; ============================================================
|
; ============================================================
|
||||||
|
|
||||||
(def train-and-test-data (psb2/fetch-examples "data" "fuel-cost" 200 2000))
|
(def train-data (dc/read-data-that-has-no-strings "fuel-cost" "train"))
|
||||||
|
(def test-data (dc/read-data-that-has-no-strings "fuel-cost" "test"))
|
||||||
|
|
||||||
; Random integer between -100 and 100 (from smallest)
|
; Random integer between -100 and 100 (from smallest)
|
||||||
(defn random-int [] (- (rand-int 201) 100))
|
(defn random-int [] (- (rand-int 201) 100))
|
||||||
@ -68,9 +70,9 @@
|
|||||||
(merge
|
(merge
|
||||||
{:instructions instructions
|
{:instructions instructions
|
||||||
:error-function error-function
|
:error-function error-function
|
||||||
:training-data (:train train-and-test-data)
|
:training-data train-data
|
||||||
:testing-data (:test train-and-test-data)
|
:testing-data test-data
|
||||||
:case-t-size (count (:train train-and-test-data))
|
:case-t-size (count train-data)
|
||||||
:case-parent-rate 0
|
:case-parent-rate 0
|
||||||
:case-parent-gens 1
|
:case-parent-gens 1
|
||||||
:max-generations 300
|
:max-generations 300
|
||||||
|
Loading…
x
Reference in New Issue
Block a user