On Fri, Jan 4, 2013 at 4:35 AM, Dan Filimon <[email protected]>wrote:
> Hi, > > I'm playing around with using random projections for faster > nearest-neighbor searches. > > Until now, I was projecting using a list of vectors rather than a > Matrix because MatrixSlices weren't vectors (although I'm looking to > change that). > What do you mean by this? MatrixSlice has a method to get the vector from it, right? It's really just a Pair<Integer, Vector>, after all. > > Anyway, I've written a tiny non-scientific benchmark and I'm getting > unexpected results that I documented at [1]. > > It seems that using matrices is about 1.6 seconds slower on average > (with a std dev of 0.68s). > 1.6 seconds slower doesn't say much, being an absolute number - what you mean is that matrix multiplication is ~30% slower than by raw vectors, which is certainly strange. > > The code I used is here [2]. > > The thing that's bothering me is that a had an older version that > behaved totally different but I overwrote it and don't have it any > more. :( > > Would you expect there to be any difference between these two ways of > projecting? > > Thanks! > > [1] https://github.com/dfilimon/knn/issues/12 > [2] > https://github.com/dfilimon/knn/blob/76e230830f4a90fb116634450fc58b99ebb75154/src/test/java/org/apache/mahout/knn/tools/ProjectionBenchmark.java > -- -jake
