mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suneel Marthi (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MAHOUT-1146) Cardinality exception bug in 'cross' method of AbstractVector class.
Date Thu, 25 Jul 2013 12:25:50 GMT

     [ https://issues.apache.org/jira/browse/MAHOUT-1146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Suneel Marthi updated MAHOUT-1146:
----------------------------------

    Fix Version/s: 0.8
    
> 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
>             Fix For: 0.8
>
>   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

Mime
View raw message