Skip to content

write.matrix.csr data conversion

3 messages · David Meyer, Sam Steingold

#
David,
thanks for adding the feature.

read.matrix.csr and, especially, write.matrix.csr are extremely slow:

     user    system   elapsed
 8381.988  3810.396 12345.349

for a 2797634 x 224 matrix I have to deal with.

The help page
http://rss.acs.unt.edu/Rdoc/library/e1071/html/read.matrix.csr.html
says

David Meyer (based on C/C++-code by Chih-Chung Chang and Chih-Jen Lin)

is there any chance that you might consider replacing the R code with
the original C/C++?

Thanks a lot!

  
    
#
Dear Sam,

there is C-code related to *reading* in such a file, but in the internal 
libsvm-format, not the matrix.csr format.

There is no C-code for *writing* this to a file.

There is certainly a way to speed this up, but I am not likely to do 
this in the near future.

Best
David
On 2012-11-06 19:15, Sam Steingold wrote:

  
    
#
Dear David,
How is the libsvm-format differ from matrix.csr format?
I actually use matrix.csr only because it prints to what libsvm can read.
too bad.