Use Weka to do logistic Regression

Source: Internet
Author: User

1, first download installation Weka

Http://www.cs.waikato.ac.nz/ml/weka/downloading.html

2. Open the Weka and select the first explorer

3, prepare the data set file, in Weka, the general data file is: Xxx.arff, for example, I edit a file called Tumor.arff, the contents of the file is:

@RELATION tumor

@ATTRIBUTE size NUMERIC
@ATTRIBUTE ' Class ' {' 1 ', ' 0 '}

@DATA
0.0, ' 0 '
0.1, ' 0 '
0.7, ' 1 '
1.0, ' 0 '
1.1, ' 0 '
1.3, ' 0 '
1.4, ' 1 '
1.7, ' 1 '
2.1, ' 1 '
2.2, ' 1 '

To explain the data a little bit, the size property represents tumor, and the class enclosed in quotation marks should be a reserved word in Weka, specifically for the category.

4, load the data. Under the Preprocess tab of the main interface, click Open File and select the data file that is ready in step three: Tumor.arff

In this interface, you can see some statistical information about the data, as well as some graphical display, students can explore their own.

6. Switch to the Classify tab of the main interface, click Choose, and select Logistic under the Functions branch.

Test Options Select Use Training set, then click Start

Use Weka to do logistic Regression

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.