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