fixed autods errors
This commit is contained in:
parent
fc738e2154
commit
1f62d9ca41
@ -79,7 +79,7 @@
|
||||
(utils/filter-by-index distance-list (map #(:index %) tournament)))
|
||||
(map #(:distances %) new-downsample)))
|
||||
selected-case-index (metrics/argmax min-case-distances)]
|
||||
(if (or (<= (apply max min-case-distances) case-delta) (zero? (count cases-to-pick-from)))
|
||||
(if (or (= 0 (count tournament)) (<= (apply max min-case-distances) case-delta))
|
||||
new-downsample
|
||||
(do
|
||||
(if (sequential? (:input1 (first new-downsample)))
|
||||
|
@ -12,11 +12,13 @@
|
||||
(defn argmax
|
||||
"returns the index of the maximum value in a list, randomly tiebreaking"
|
||||
[coll]
|
||||
(->> coll
|
||||
(map-indexed vector)
|
||||
(filter #(= (apply max coll) (second %)))
|
||||
rand-nth
|
||||
first))
|
||||
(if (zero? (count coll))
|
||||
:null
|
||||
(->> coll
|
||||
(map-indexed vector)
|
||||
(filter #(= (apply max coll) (second %)))
|
||||
rand-nth
|
||||
first)))
|
||||
|
||||
(defn mean
|
||||
"Returns the mean of a collection."
|
||||
|
Loading…
x
Reference in New Issue
Block a user