mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Illecker (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (MAHOUT-1266) Two minor problems in DistributedRowMatrix using MatrixMultiplication
Date Wed, 19 Jun 2013 09:50:20 GMT

    [ https://issues.apache.org/jira/browse/MAHOUT-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13687804#comment-13687804
] 

Martin Illecker edited comment on MAHOUT-1266 at 6/19/13 9:49 AM:
------------------------------------------------------------------

I have executed the following commands, based on the example before:

{{mahout matrixmult --numRowsA 4 --numColsA 4 --numRowsB 4 --numColsB 4 --inputPathA /pathTo/MatrixA.seq
--inputPathB /pathTo/MatrixB.seq}}

{{mahout vectordump -i /pathTo/MatrixA.seq}} [1]
{0:9.0,1:4.0,2:1.0,3:9.0}
{0:1.0,1:8.0,2:6.0,3:3.0}
{0:8.0,1:3.0,2:3.0,3:9.0}
{0:7.0,1:1.0,2:9.0,3:6.0}

{{mahout vectordump -i /pathTo/MatrixB.seq}} [2]
{0:2.0,1:1.0,2:6.0,3:5.0}
{0:7.0,1:8.0,2:9.0,3:5.0}
{0:2.0,1:1.0,2:5.0,3:8.0}
{0:7.0,1:4.0,2:4.0,3:9.0}

{{mahout vectordump -i /pathTo/productWith-80}}
{0:90.0,1:77.0,2:113.0,3:99.0}
{0:53.0,1:75.0,2:88.0,3:66.0}
{0:131.0,1:115.0,2:111.0,3:150.0}
{0:177.0,1:93.0,2:140.0,3:186.0}

Shouldn't C be something like this[3]:

|111|78|131|154|
|91|83|120|120|
|106|71|126|160|
|81|48|120|166|

[1] [https://github.com/millecker/applications/blob/master/hadoop/rootbeer/matrixmultiplication/MatrixA.seq]
[2] [https://github.com/millecker/applications/blob/master/hadoop/rootbeer/matrixmultiplication/MatrixB.seq]
[3] [http://www.wolframalpha.com/input/?i=%7B%7B9%2C4%2C1%2C9%7D%2C%7B1%2C8%2C6%2C3%7D%2C%7B8%2C3%2C3%2C9%7D%2C%7B7%2C1%2C9%2C6%7D%7D*%7B%7B2%2C1%2C6%2C5%7D%2C%7B7%2C8%2C9%2C5%7D%2C%7B2%2C1%2C5%2C8%7D%2C%7B7%2C4%2C4%2C9%7D%7D]
                
      was (Author: bafu):
    I have executed the following commands, based on the example before:

{{mahout matrixmult --numRowsA 4 --numColsA 4 --numRowsB 4 --numColsB 4 --inputPathA /pathTo/MatrixA.seq
--inputPathB /pathTo/MatrixB.seq}}

{{mahout vectordump -i /pathTo/MatrixA.seq}}
{0:9.0,1:4.0,2:1.0,3:9.0}
{0:1.0,1:8.0,2:6.0,3:3.0}
{0:8.0,1:3.0,2:3.0,3:9.0}
{0:7.0,1:1.0,2:9.0,3:6.0}

{{mahout vectordump -i /pathTo/MatrixB.seq}}
{0:2.0,1:1.0,2:6.0,3:5.0}
{0:7.0,1:8.0,2:9.0,3:5.0}
{0:2.0,1:1.0,2:5.0,3:8.0}
{0:7.0,1:4.0,2:4.0,3:9.0}

{{mahout vectordump -i /pathTo/productWith-80}}
{0:90.0,1:77.0,2:113.0,3:99.0}
{0:53.0,1:75.0,2:88.0,3:66.0}
{0:131.0,1:115.0,2:111.0,3:150.0}
{0:177.0,1:93.0,2:140.0,3:186.0}

Shouldn't C be something like this:

|111|78|131|154|
|91|83|120|120|
|106|71|126|160|
|81|48|120|166|

[1] [http://www.wolframalpha.com/input/?i=%7B%7B9%2C4%2C1%2C9%7D%2C%7B1%2C8%2C6%2C3%7D%2C%7B8%2C3%2C3%2C9%7D%2C%7B7%2C1%2C9%2C6%7D%7D*%7B%7B2%2C1%2C6%2C5%7D%2C%7B7%2C8%2C9%2C5%7D%2C%7B2%2C1%2C5%2C8%7D%2C%7B7%2C4%2C4%2C9%7D%7D]
                  
> Two minor problems in DistributedRowMatrix using MatrixMultiplication
> ---------------------------------------------------------------------
>
>                 Key: MAHOUT-1266
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-1266
>             Project: Mahout
>          Issue Type: Bug
>          Components: Math
>    Affects Versions: 0.7
>            Reporter: Martin Illecker
>            Priority: Trivial
>              Labels: newbie
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> Hello,
> I think I have found two minor problems in *DistributedRowMatrix*.
> In [1] the condition is wrong, because (l x m) * (m x n) = (l x n).
> The condition should be like in [2]. 
> And in *times*[3] the {{this.transpose()}} seems to be missing? (See [4])
> Do you have any benchmark results for Mahout MatrixMultiplication?
> Thanks!
> Martin
> [1] [https://github.com/apache/mahout/blob/trunk/core/src/main/java/org/apache/mahout/math/hadoop/DistributedRowMatrix.java#L191-193]
> [2] [https://github.com/millecker/applications/blob/master/hadoop/rootbeer/matrixmultiplication/src/at/illecker/hadoop/rootbeer/examples/matrixmultiplication/DistributedRowMatrix.java#L221-225]
> [3] [https://github.com/apache/mahout/blob/trunk/core/src/main/java/org/apache/mahout/math/hadoop/DistributedRowMatrix.java#L190-206]
> [4] [https://github.com/millecker/applications/blob/master/hadoop/rootbeer/matrixmultiplication/src/at/illecker/hadoop/rootbeer/examples/matrixmultiplication/DistributedRowMatrix.java#L230-231]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message