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

Hudson commented on MAHOUT-1146:
--------------------------------

Integrated in Mahout-Quality #1895 (See 
[https://builds.apache.org/job/Mahout-Quality/1895/])
    MAHOUT-1146 Cardinality exception bug in 'cross' method of AbstractVector 
class (Revision 1455106)

     Result = SUCCESS
ssc : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1455106
Files : 
* /mahout/trunk/math/src/main/java/org/apache/mahout/math/MatrixVectorView.java
* 
/mahout/trunk/math/src/test/java/org/apache/mahout/math/MatrixVectorViewTest.java

                
> Cardinality exception bug in 'cross' method of AbstractVector class.
> --------------------------------------------------------------------
>
>                 Key: MAHOUT-1146
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-1146
>             Project: Mahout
>          Issue Type: Bug
>          Components: Math
>    Affects Versions: 0.8
>         Environment: Ubuntu 12.10 64-bit
>            Reporter: Ceyhun Can Ülker
>            Assignee: Sebastian Schelter
>            Priority: Critical
>              Labels: cross, math, matrix, vector
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> This bug is probably about the viewColumn method, or matrixLike method or 
> MatrixVectorView constructor, I didn't really looked into it. But it is easy 
> to reproduce.
> I have a dense matrix U of size 10x670. When I try to do this I get a 
> cardinality exception, which doesn't make sense:
> Vector uI = U.viewColumn(i);
> Matrix outerProduct = uI.cross(uI);
> Exception is thrown from AbstractMatrix class' cross method, when a row is 
> tried to be assigned in the result matrix.
>   public Matrix cross(Vector other) {
>     Matrix result = matrixLike(size, other.size());
>     for (int row = 0; row < size; row++) {
>       result.assignRow(row, other.times(getQuick(row)));
>     }
>     return result;
>   }
> The problem here is matrixLike method does not return a 10x10 matrix as it 
> should, instead it returns 1x1 matrix. 
> Hope this helps.

--
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

Reply via email to