Skip to content

read/write data in libsvm format

1 message · Sam Steingold

#
How do I read/write libsvm data into/from R?

The libsvm format is sparse data like

<class/target>[ <attribute number>:<attribute value>]*

e.g.,

1 10:3.4 123:0.5 34567:0.231
0.2 22:1 456:03

The "foreign" library does not seem to provide the necessary functionality.

Any suggestions? Code?

Thanks!

http://stackoverflow.com/questions/12112558/r-read-write-data-in-libsvm-format