The data files from http://www.csie.ntu.edu.tw/~cjlin/libsvm/ are in 'svm' format. I am trying to read this in to sparse matrix representation in R. Is there an easy/efficient way to do this?
Here is what I am doing now: read in file line by line (800,000 lines), for each line separate classes, values, and cols. Store the classes as a list and the features as a .csr sparse matrix (1 row), then rbind the feature row with all previous rows.
This is terribly inefficient and basically won't finish (12 minutes for 1000 lines). I think it comes from rbinding the sparse matrices once the number of rows starts to get large.
Note: the matrix (800000*48000) is too big to build and then convert to sparse format.