mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jake Mannix <>
Subject Re: Taste-GenericItemBasedRecommender
Date Sun, 13 Dec 2009 11:11:20 GMT
On Sat, Dec 12, 2009 at 5:34 PM, Ted Dunning <> wrote:

> This is a key problem.
> Looks like we really need to think about versions of assign that only scan
> non-zero elements.  Something like assignFromNonZero.

This is easier than the rest of the stuff we are talking about here.
you have a UnaryFunction f such that f.apply(0) == 0, or you have a
BinaryFunction b such that b.appy(x, 0) == x or b.apply(0, x) == x, then
should take advantage of this and iterateNonZero() on the vector which can
be skipped over.  In Colt, they actually special-case out functions like
or Minus to take care of this.

In our case, a particular, PlusWithScale is a very very common function
for Vectors to do, and could be special cased itself, in AbstractVector.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message