<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -21,7 +21,7 @@
                          (sqrt (- (sum (map #(square %) y))
                                   (* o (square sum-y)))))]
     (if (= 0.0 prod-of-sqrts)
-      0.0
+      nil
       (/ (- (sum (map #(* %1 %2) x y))
             (* o sum-x sum-y)) 
          prod-of-sqrts))))
@@ -45,7 +45,7 @@
   ([target others] (closest-vector target others 0))
   ([target others n]
    (let [current (first others)
-         sim (pearson target current)
+         sim (or (pearson target current) 0.0)
          others (rest others)]
      (if (= 0 (count others))
        [sim, n]</diff>
      <filename>internal/internal.clj</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>47442d90b9d9d002437f2af785919bfa55b1fad8</id>
    </parent>
  </parents>
  <author>
    <name>Tyler McMullen</name>
    <email>tbmcmullen@gmail.com</email>
  </author>
  <url>http://github.com/tyler/clojure-cluster/commit/55633a0ad424fa2478dd26908d1f1869fb45ac41</url>
  <id>55633a0ad424fa2478dd26908d1f1869fb45ac41</id>
  <committed-date>2008-11-07T09:59:34-08:00</committed-date>
  <authored-date>2008-11-07T09:59:34-08:00</authored-date>
  <message>More correct Pearson.  Returns nil if either vector has a slope of 0.</message>
  <tree>15e3693d9cd4a9245d13b68ad8f9449ea1f6f350</tree>
  <committer>
    <name>Tyler McMullen</name>
    <email>tbmcmullen@gmail.com</email>
  </committer>
</commit>
