mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastian Schelter (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAHOUT-1266) Two minor problems in DistributedRowMatrix using MatrixMultiplication
Date Wed, 19 Jun 2013 10:21:22 GMT

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

Sebastian Schelter commented on MAHOUT-1266:
--------------------------------------------

Martin, the magic trick here is that A is *never* explicitly transposed. There are various
ways to compute a matrix multiplication, I'll show you row outer producter formulation on
a small example:


http://latex.codecogs.com/gif.latex?A%20%3D%20%5Cbegin%7Bbmatrix%7D%201%20%26%202%5C%5C%203%20%26%204%20%5Cend%7Bbmatrix%7D%20B%20%3D%5Cbegin%7Bbmatrix%7D%205%20%26%206%5C%5C%207%20%26%208%20%5Cend%7Bbmatrix%7D%20A%5ETB%20%3D%5Cbegin%7Bbmatrix%7D%2026%20%26%2030%5C%5C%2038%20%26%2044%20%5Cend%7Bbmatrix%7D%20%5C%5C%20A%5ETB%20%3D%20a_%7B%5Cbullet%201%7D%20%5Ctimes%20b_%7B1%20%5Cbullet%7D%20&plus;%20a_%7B%5Cbullet%202%7D%20%5Ctimes%20b_%7B2%20%5Cbullet%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%201%5C%5C%202%20%5Cend%7Bbmatrix%7D%20%5Ctimes%20%5Cbegin%7Bbmatrix%7D%205%20%26%206%20%5Cend%7Bbmatrix%7D%20&plus;%20%5Cbegin%7Bbmatrix%7D%203%5C%5C%204%20%5Cend%7Bbmatrix%7D%20%5Ctimes%20%5Cbegin%7Bbmatrix%7D%207%20%26%208%20%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%205%20%26%206%5C%5C%2010%20%26%2012%20%5Cend%7Bbmatrix%7D%20&plus;%20%5Cbegin%7Bbmatrix%7D%2021%20%26%2024%5C%5C%2038%20%26%2044%20%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%2026%20%26%2030%5C%5C%2038%20%26%2044%20%5Cend%7Bbmatrix%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