buliugu / airhead-research

Automatically exported from code.google.com/p/airhead-research
0 stars 0 forks source link

Log entropy transform throws exception when using the matlab sparse matrix format #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run lsa and select octave or matlab to do the svd

What is the expected output? What do you see instead?

FINE: stored term-document matrix in format MATLAB_SPARSE at 
/tmp/matlab-sparse-matrix3622984674570670663.dat
java.lang.ArrayIndexOutOfBoundsException: 271084
        at edu.ucla.sspace.matrix.LogEntropyTransform$LogEntropyGlobalTransform.transform(LogEntropyTransform.java:239)
        at edu.ucla.sspace.matrix.MatlabSparseFileTransformer.transform(MatlabSparseFileTransformer.java:61)
        at edu.ucla.sspace.matrix.BaseTransform.transform(BaseTransform.java:57)
        at edu.ucla.sspace.matrix.BaseTransform.transform(BaseTransform.java:46)
        at edu.ucla.sspace.lsa.LatentSemanticAnalysis.processSpace(LatentSemanticAnalysis.java:463)
        at edu.ucla.sspace.mains.GenericMain.processDocumentsAndSpace(GenericMain.java:504)
        at edu.ucla.sspace.mains.GenericMain.run(GenericMain.java:432)
        at edu.ucla.sspace.mains.LSAMain.main(LSAMain.java:147)

Please use labels and text to provide additional information.

Original issue reported on code.google.com by David.Ju...@gmail.com on 14 Jan 2011 at 6:46

GoogleCodeExporter commented 9 years ago
Ah, i think i know what caused this problem.  The matlab sparse matrix builder 
wrote entires in the order of [row col value] while the matlab file iterator 
read entries in the order of [col row value].  I've fixed this due to another 
related issue in both wordsi-update and the trunk (via the termdoc-rewrite 
branch).  

Issue solved.

Original comment by FozzietheBeat@gmail.com on 27 Feb 2011 at 5:20