2015年10月10日 星期六

weka.classifiers.misc.HyperPipes

weka.classifiers.misc.HyperPipes 屬類別屬性區間學習器,
記錄符合類別的屬性出現區間,再預測屬性符合比例高之類別,可提供案例集基本表現值供標竿比較之用。

HyperPipes 學習分類時,為每個類別建立一個超區間(hyperpipe),記錄每個屬性有出現該類別的案例區間為何。
預測分類時,計算新案例符合各類別的超區間程度,取符合程度高者為其預測類別。
案例符合某類別超區間程度(0~1)乃案例有多少比例(介於0~100%)的屬性落於某類別超區間的屬性描述區間內。

> java -cp weka.jar;. weka.classifiers.misc.HyperPipes  -t data\weather.numeric.arff

HyperPipes classifier
HyperPipe for class: yes
  temperature: 64.0,83.0,
  humidity: 65.0,96.0,
  outlook: true,true,true,
  windy: true,true,

HyperPipe for class: no
  temperature: 65.0,85.0,
  humidity: 70.0,95.0,
  outlook: true,false,true,
  windy: true,true,


Time taken to build model: 0 seconds
Time taken to test model on training data: 0 seconds

=== Error on training data ===

Correctly Classified Instances          10               71.4286 %
Incorrectly Classified Instances         4               28.5714 %
Kappa statistic                          0.2432
Mean absolute error                      0.4531
Root mean squared error                  0.4597
Relative absolute error                 97.5824 %
Root relative squared error             95.8699 %
Total Number of Instances               14


=== Confusion Matrix ===

 a b   <-- classified as
 9 0 | a = yes
 4 1 | b = no



=== Stratified cross-validation ===

Correctly Classified Instances           9               64.2857 %
Incorrectly Classified Instances         5               35.7143 %
Kappa statistic                          0
Mean absolute error                      0.483
Root mean squared error                  0.4899
Relative absolute error                101.4286 %
Root relative squared error             99.3055 %
Total Number of Instances               14


=== Confusion Matrix ===

 a b   <-- classified as
 9 0 | a = yes
 5 0 | b = no


如下 weather.numeric.arff 案例集的14個案例有9個yes,5個no。
outlook temperature humidity windy play
sunny 85 85 FALSE no
sunny 80 90 TRUE no
rainy 65 70 TRUE no
sunny 72 95 FALSE no
rainy 71 91 TRUE no
overcast 83 86 FALSE yes
rainy 70 96 FALSE yes
rainy 68 80 FALSE yes
overcast 64 65 TRUE yes
sunny 69 70 FALSE yes
rainy 75 80 FALSE yes
sunny 75 70 TRUE yes
overcast 72 90 TRUE yes
overcast 81 75 FALSE yes
參考: weka.classifiers.misc.HyperPipes 1. source code 2. documentation

沒有留言: