Weka ADTree分类在excel中重复

时间:2016-06-19 09:27:51

标签: excel machine-learning weka

使用Weka 3.8.0 GUI,我有一个数据集(二进制类),并且必须为数据建立ADTree模型。到现在为止还挺好。

    === Classifier model (full training set) ===

Alternating decision tree:

: 0
|  (1)vitamine_E < 0.346: -0.671
|  |  (9)oxoproline < 20.391: -0.406
|  |  (9)oxoproline >= 20.391: 0.471
|  (1)vitamine_E >= 0.346: 1.609
|  (2)glucose_1_phosphate < 0.159: -0.38
|  |  (3)ribonic_acid2 < 0.071: -1.074
|  |  |  (6)vitamine_E < 0.346: -0.937
|  |  |  (6)vitamine_E >= 0.346: 0.485
|  |  (3)ribonic_acid2 >= 0.071: 1.431
|  |  (4)inositol_put__49 < 8.363: 0.75
|  |  (4)inositol_put__49 >= 8.363: -0.788
|  |  (8)erythritol__put_ < 0.066: 0.564
|  |  (8)erythritol__put_ >= 0.066: -0.518
|  (2)glucose_1_phosphate >= 0.159: 1.407
|  |  (7)threonic_acid < 1.762: 0.885
|  |  (7)threonic_acid >= 1.762: -0.468
|  (5)glucose < 1.52: -0.298
|  (5)glucose >= 1.52: 0.884
|  |  (10)ribonic_acid2 < 0.02: -0.159
|  |  (10)ribonic_acid2 >= 0.02: 0.585
Legend: -ve = 0, +ve = 1
Tree size (total number of nodes): 31
Leaves (number of predictor nodes): 21

Time taken to build model: 0.02 seconds

=== Stratified cross-validation ===
=== Summary ===

Correctly Classified Instances         120               92.3077 %
Incorrectly Classified Instances        10                7.6923 %
Kappa statistic                          0.8462
Mean absolute error                      0.1095
Root mean squared error                  0.2413
Relative absolute error                 21.8844 %
Root relative squared error             48.2298 %
Total Number of Instances              130     

然后我必须在excel中重复分类(采用模型)。那我该怎么做?当我使用PARTSMO算法时,我已经这样做了,但我如何转换&#39;树分为excel函数或分别读取分类路径?

1 个答案:

答案 0 :(得分:0)

决策树是一组if函数,因此您可以将树转换为ifs,例如:

if(cell_of((1)vitamine_E))&lt; 0.346; -0.671;如果....