You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by Otis Gospodnetic <ot...@gmail.com> on 2013/04/09 18:05:20 UTC

Fwd: MODERATE for dev@mahout.apache.org

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: <de...@mahout.apache.org>
Date: Tue, Apr 9, 2013 at 11:32 AM
Subject: MODERATE for dev@mahout.apache.org
To:
Cc: dev-allow-tc.1365521572.gbiaibhjmehhblcfhccl-noreply=
reviews.apache.org@mahout.apache.org



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



---------- Forwarded message ----------
From: "Saikat Kanjilal" <sx...@hotmail.com>
To: "Sebastian Schelter" <ss...@apache.org>, "Saikat Kanjilal" <
sxk1969@hotmail.com>, "Ted Dunning" <td...@apache.org>
Cc: "Dan Filimon" <da...@gmail.com>, "mahout" <
dev@mahout.apache.org>
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/>