Permalink
Browse files

made combination function explicit

  • Loading branch information...
1 parent b3a25e3 commit 38f588c17f58aa7f31635a466ba1cbf1e3a21bbf @eandrejko committed Apr 28, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 test/random_forests/test/core.clj
  2. +2 −2 test/random_forests/test/toy.clj
@@ -154,4 +154,4 @@
(deftest combine-predictions-combines-predictions-with-mean
(let [inputs (list {[:a 0.0] [0.5]} {[:a 0.0] [0.0]} {[:b 1.0] [1.0]})
expected (list [0.0 0.25] [1.0 1.0])]
- (is (= (set expected) (set (combine-predictions inputs))))))
+ (is (= (set expected) (set (combine-predictions avg inputs))))))
@@ -25,7 +25,7 @@
(take 100))]
(is (= 1 (classify-scalar forest (first examples))))
(is (= 2 (classify-scalar forest (last examples))))
- (is (= 0 (->> (evaluate-forest forest) ;; held out data
+ (is (= 0 (->> (evaluate-forest forest avg) ;; held out data
(map (fn [[a b]] (- a b)))
(reduce +))))))
@@ -35,7 +35,7 @@
features #{(feature "only" 0 :continuous)}
forest (->> (build-random-forest examples features 100 100)
(take 50))
- evaluation (evaluate-forest forest)] ;; held out data
+ evaluation (evaluate-forest forest avg)] ;; held out data
;; ratio between input and output should be approximately two
(is (approx? 2 (->> (range 1 100)
(map (fn [z] [z (classify-scalar forest [z z])]))

0 comments on commit 38f588c

Please sign in to comment.