From bab0f663ae93fe62e78660dcfe8b59cfd3426f41 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Tue, 8 May 2012 08:05:31 -0700 Subject: [PATCH] math.similarity: fix tests, not sure this is the correct definition. --- extra/math/similarity/similarity.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/math/similarity/similarity.factor b/extra/math/similarity/similarity.factor index a8ae722282..b1f78569c0 100644 --- a/extra/math/similarity/similarity.factor +++ b/extra/math/similarity/similarity.factor @@ -9,7 +9,7 @@ IN: math.similarity v- norm 1 + recip ; : pearson-similarity ( a b -- n ) - over length 3 < [ 2drop 1.0 ] [ corr 0.5 * 0.5 + ] if ; + over length 3 < [ 2drop 1.0 ] [ full-corr 0.5 * 0.5 + ] if ; : cosine-similarity ( a b -- n ) [ v* sum ] [ [ norm ] bi@ * ] 2bi / 0.5 * 0.5 + ;