Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
software:rewsspacepackage [2010/11/21 13:04]
eapontep [Testing]
software:rewsspacepackage [2010/12/07 12:53] (current)
eapontep
Line 1: Line 1:
-==== STATE ==== 
-It is working in my computer. I will write a script and run it on the whole American National Corpus and test results, memory and the type of vector produced! I talked with the Adms. and in the next few days the package should be running on the server. 
- 
- 
 ==== General ====  ==== General ==== 
  
Line 29: Line 25:
   * A new directory should have been created. Go to the directory and use the command<file bash>ant</file>. Ant is part of the Apache project and is used to build java libraries. It will automatically detect the file build.html and install from it. I explained [[rewSemVector|here]] how to install ant.   * A new directory should have been created. Go to the directory and use the command<file bash>ant</file>. Ant is part of the Apache project and is used to build java libraries. It will automatically detect the file build.html and install from it. I explained [[rewSemVector|here]] how to install ant.
   * If you want to make direct use of the .jar, you would also like to use the command   * If you want to make direct use of the .jar, you would also like to use the command
- 
-==== Technical Issues ==== 
- 
  
 ==== Testing ==== ==== Testing ====
Line 55: Line 48:
 Nov 21, 2010 12:44:10 PM edu.ucla.sspace.matrix.MatrixIO matlabToSvdlibcSparseBinary Nov 21, 2010 12:44:10 PM edu.ucla.sspace.matrix.MatrixIO matlabToSvdlibcSparseBinary
 INFO: Converting from Matlab double values to SVDLIBC float values; possible loss of precision</file> INFO: Converting from Matlab double values to SVDLIBC float values; possible loss of precision</file>
-    Interestinglythis class uses as internal representation of the document vectors MATLAB matricesThis is importantbecause this format is used also by SVD implementation in scipy and in divisi.+ 
 + 
 +=== Trials with LSA === 
 + 
 +I performed a number of trials with LSA. This trials where intended to prove the time and memory comsumed by different algorithms compatible with the LSA implementation. Available from the command lines are: 
 + 
 +  SVDLIBC 
 +  * Matlab 
 +  * GNU Octave 
 +  * JAMA 
 +  * COLT  
 + 
 +I didn't make a large review of the implementations and rather start proving every algorithm. As previous results showedusing the default algorithm (SVDLIBC) generated strange results (the angular distance between vectors) was extremely low among close neighbors. Two reason were identified as possible: either, the number of dimensions was to low in relation to the numbers of documents; this would cause that performing SVD would collapse the distance, creating a extremely dense vector-spaceA second possibility was a bug in the implementation. My supposition is thatsince the implementation requires a pipeline between the internal format of the argument and SVDLIBC, a loss in precision caused the problem. If that were the problem, selecting Matlab for SVD should solve the problem (because the matlab format are the internal format of lsa are identical). 
 + 
 +I performed a test with 30000 document and 200 dimensions with SVDLIBC, MATLAB, OCTAVE and COLT. The results were in part disappointing because, with the exception of MATLAB, all other algorithms ran out of memory (in particular, the pipeline between LSA and the SVD algorithm ran out of heap memory). 
 + 
 +  * SVDLIBC: Ran out of memory at 6459 seconds. 
 +  * Matlab: After 5083 seconds returned a 450Mb .sspace file 
 +  * GNU Octave: Ran out of memory at 7624 seconds 
 + 
 + 
 +{{:software:stats.png|Statistics 1}} 
 + 
 +Visual inspection suggest that problems regarding the density of the vector space are solved by using MATLAB as the defauld algorithm. 
 + 
 +{{:software:statmatlab.png|}} 
 + 
 +Finally, I compared the scalability of Random Indexing and LSA (using SVDLIBC with 100 dimension): 
 + 
 +{{:software:stats3.png|}} 
 + 
 +It is clear that LSA can hardly handle large corpora. Although the results are different in the case of Random Indexing, they suggest a similar conclusion. 
 + 
 +I wrote a simple script that automatically document the results of every experiment. It can be found under the key name "myScript.sh" in the corpora directory. The results are documented in the directory statistics. A python script automatically generates a graphviz representation in the directory vizImages. Since it is intended to be used with twopi, it has this very extension.