more comparisons
This commit is contained in:
parent
265d9f8c17
commit
a4703d60a8
@ -92,8 +92,9 @@
|
|||||||
:training-data [] ; must be provided
|
:training-data [] ; must be provided
|
||||||
:umad-rate 0.1 ; addition rate (from which deletion rate will be derived) for UMAD
|
:umad-rate 0.1 ; addition rate (from which deletion rate will be derived) for UMAD
|
||||||
:variation {:umad 1} ; genetic operators and probabilities for their use, which should sum to 1
|
:variation {:umad 1} ; genetic operators and probabilities for their use, which should sum to 1
|
||||||
:tournament-comp-op min-key ; individual error comparison operator for tournament selection
|
:tournament-comp-op min-key ; individual error comparison operator for tournament selection (switch to max-key for max)
|
||||||
:lexicase-comp-op min ; individual error comparison operator for lexicase selection
|
:lexicase-comp-op min ; individual error comparison operator for lexicase selection (switch to max for max)
|
||||||
|
:population-sort-comp < ; comparision operator to use for sorting the population
|
||||||
}
|
}
|
||||||
defaulted (merge defaults argmap)]
|
defaulted (merge defaults argmap)]
|
||||||
(merge defaulted ; use the map below to include derived values in argmap
|
(merge defaulted ; use the map below to include derived values in argmap
|
||||||
@ -104,7 +105,7 @@
|
|||||||
[non-default-argmap]
|
[non-default-argmap]
|
||||||
(let [argmap (fill-defaults non-default-argmap)
|
(let [argmap (fill-defaults non-default-argmap)
|
||||||
{:keys [population-size max-generations error-function solution-error-threshold dont-end
|
{:keys [population-size max-generations error-function solution-error-threshold dont-end
|
||||||
downsample? ds-parent-rate ds-parent-gens ids-type]} argmap]
|
downsample? ds-parent-rate ds-parent-gens ids-type population-sort-comp]} argmap]
|
||||||
;; print starting args
|
;; print starting args
|
||||||
(prn {:starting-args (update (update argmap :error-function str)
|
(prn {:starting-args (update (update argmap :error-function str)
|
||||||
:instructions
|
:instructions
|
||||||
@ -136,13 +137,13 @@
|
|||||||
'()) ;else just empty list
|
'()) ;else just empty list
|
||||||
; parent representatives for down-sampling
|
; parent representatives for down-sampling
|
||||||
rep-evaluated-pop (if downsample?
|
rep-evaluated-pop (if downsample?
|
||||||
(sort-by :total-error
|
(sort-by :total-error population-sort-comp
|
||||||
(utils/pmapallv
|
(utils/pmapallv
|
||||||
(partial error-function argmap indexed-training-data)
|
(partial error-function argmap indexed-training-data)
|
||||||
parent-reps
|
parent-reps
|
||||||
argmap))
|
argmap))
|
||||||
'())
|
'())
|
||||||
evaluated-pop (sort-by :total-error
|
evaluated-pop (sort-by :total-error population-sort-comp
|
||||||
(utils/pmapallv
|
(utils/pmapallv
|
||||||
(partial error-function argmap training-data)
|
(partial error-function argmap training-data)
|
||||||
population
|
population
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
:error-function regression/error-function
|
:error-function regression/error-function
|
||||||
:training-data (:train regression/train-and-test-data)
|
:training-data (:train regression/train-and-test-data)
|
||||||
:testing-data (:test regression/train-and-test-data)
|
:testing-data (:test regression/train-and-test-data)
|
||||||
:max-generations 5
|
:max-generations 20
|
||||||
:population-size 50
|
:population-size 50
|
||||||
:max-initial-plushy-size 100
|
:max-initial-plushy-size 100
|
||||||
:step-limit 200
|
:step-limit 200
|
||||||
@ -105,7 +105,9 @@
|
|||||||
:umad-rate 0.01
|
:umad-rate 0.01
|
||||||
:variation {:umad 1.0
|
:variation {:umad 1.0
|
||||||
:crossover 0.0}
|
:crossover 0.0}
|
||||||
:elitism false})
|
:elitism false
|
||||||
|
:downsample? false
|
||||||
|
})
|
||||||
|
|
||||||
#_(require '[propeller.problems.string-classification :as sc])
|
#_(require '[propeller.problems.string-classification :as sc])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user