Hi,

FYI - more of these coming my way (and maybe somebody else's inbox, too?)
today.

Otis
--
Solr & ElasticSearch Support
http://sematext.com/





---------- Forwarded message ----------
From: <dev-reject-1365521572.24467.mddiohmnggdoodfbb...@mahout.apache.org>
Date: Tue, Apr 9, 2013 at 11:32 AM
Subject: MODERATE for [email protected]
To:
Cc: dev-allow-tc.1365521572.gbiaibhjmehhblcfhccl-noreply=
[email protected]



To approve:
   dev-accept-1365521572.24467.mddiohmnggdoodfbb...@mahout.apache.org
To reject:
   dev-reject-1365521572.24467.mddiohmnggdoodfbb...@mahout.apache.org
To give a reason to reject:
%%% Start comment
%%% End comment



---------- Forwarded message ----------
From: "Saikat Kanjilal" <[email protected]>
To: "Sebastian Schelter" <[email protected]>, "Saikat Kanjilal" <
[email protected]>, "Ted Dunning" <[email protected]>
Cc: "Dan Filimon" <[email protected]>, "mahout" <
[email protected]>
Date: Tue, 09 Apr 2013 15:32:50 -0000
Subject: Re: Review Request: MAHOUT-1189: CosineDistanceMeasure doesn't
return 0 for two 0 vectors
   This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10374/

One question, I noticed in the unit tests we test with the
SequentialAccessSparseVector, was wondering why you chose this
particular vector as opposed to a densevecto, otherwise it looks fine,
really a small change.


- Saikat

On April 9th, 2013, 3:16 p.m., Dan Filimon wrote:
  Review request for mahout, Ted Dunning, Sebastian Schelter, and Saikat
Kanjilal.
By Dan Filimon.

*Updated April 9, 2013, 3:16 p.m.*
Description

CosineDistanceMeasure for two equal vectors should always return 0
like for any other distance measure, however it returns 1.
This patch fixes this issue.
Also, note that it's not necessarily obvious what the return value
should be since the cosine of two 0-length vectors isn't defined.

  Testing

Added assertion to test for this.

  Diffs

   - 
core/src/main/java/org/apache/mahout/common/distance/CosineDistanceMeasure.java
   (0c51591)
   - 
core/src/test/java/org/apache/mahout/common/distance/CosineDistanceMeasureTest.java
   (50b03f0)

View Diff <https://reviews.apache.org/r/10374/diff/>

Reply via email to