How to generate LIBSVM format data

Source: Internet
Author: User

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


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.