Perhaps your data format is TXT format, XLS format, data format, CSV format, and so on, but you want to turn it into LIBSVM format (as shown in the image below):
I know the two methods: the first method of data size has a certain limit, but also more trouble, the second method of data set size unrestricted, but also convenient and fast.
Method 1. Note: Put the label on the last column for the following procedure
① Download Formatdatalibsvm.xls
This thing is more covert, a lot of previous links are gone, looking for a long time finally found on the CSDN, the address is as follows:
http://download.csdn.net/download/wangwenjinghenhao/3139540
Thank you to the person who shared it.
② preparing the Excel data set
If the CSV format can be converted to. xls format first through Excel, see 4th below.
③ Open Formatdatalibsvm.xls
Note A box appears above to remind you that the macro has been disabled, make sure to click Change, enable Macros.
④ Loading Data
You can copy the data directly to the TopLeft cell, noting that copying only the data region-related properties should not be copied or it will crash.
⑤ Conversion
Click on the Excel interface
"Tools" –> "macro" –> "macro" –>formatdatatolibsvm–> execution
You can see that the data is being converted and moved, and you can see that the data becomes the LIBSVM format in just a minute.
Method 2:
① download Weka, unknown detail, a data mining software just
② with Weka Open data, Save As button, to find a LIBSVM option, save on the line