| © 1990 | section list B: Different representations Overview
| Previous Appendix B.1 | Next Appendix C |

Rework using the ordered mode in CN2



**RULE FILE**
@
Examples: RT01s09a.exs
Algorithm: ORDERED
Error_Estimate: LAPLACIAN
Threshold: 10.00
Star: 10
@

*ORDERED-RULE-LIST*

IF    sub_display = ship
THEN  class = NO_KEY  [0 0 340]
ELSE
IF    sub_display = umb
THEN  class = NO_KEY  [0 0 61]
ELSE
IF    rov_speed < 0.65
  AND rov_r > -0.09
  AND rov_target_range > 4.95
  AND rov_stbd_revs_demand = h_ahd
THEN  class = NO_KEY  [0 0 21]
ELSE
IF    rov_height > 2.00
  AND rov_r < 0.03
  AND rov_target_range < 4.85
  AND rov_stbd_revs_demand = stop
THEN  class = NO_KEY  [0 0 15]
ELSE
IF    rov_target_head > 2.50
  AND rov_speed > 6.06
  AND rov_port_revs_demand = stop
THEN  class = NO_KEY  [0 0 10]
ELSE
IF    0.35 < rov_height < 1.10
  AND rov_speed < 1.75
THEN  class = NO_KEY  [0 0 6]
ELSE
IF    rov_target_head < 333.00
  AND rov_speed < 0.09
  AND rov_port_revs_demand = stop
THEN  class = Port_Ths_Half_Ahead  [5 0 0]
ELSE
IF    rov_speed < 0.58
  AND 0.12 < rov_r < 0.31
  AND rov_target_range > 5.80
THEN  class = Stbd_Ths_Half_Ahead  [0 12 0]
ELSE
IF    rov_target_head < 187.50
  AND rov_r > 0.20
THEN  class = NO_KEY  [0 0 6]
ELSE
IF    rov_height < 33.50
  AND rov_speed > 0.49
  AND rov_port_revs_demand = h_astn
THEN  class = NO_KEY  [0 0 7]
ELSE
IF    rov_target_head < 264.00
  AND rov_speed > 0.20
  AND rov_port_revs_demand = h_astn
THEN  class = Stbd_Ths_Half_Ahead  [0 7 0]
ELSE
IF    rov_r < 0.02
  AND rov_target_range > 161.15
THEN  class = Port_Ths_Half_Ahead  [5 0 0]
ELSE
IF    rov_port_revs_demand = h_ahd
THEN  class = NO_KEY  [2 27 30]
ELSE
IF    rov_speed < 2.33
  AND rov_target_range < 134.90
  AND rov_stbd_revs_demand = h_ahd
THEN  class = Port_Ths_Half_Ahead  [18 0 0]
ELSE
IF    rov_degrees < 31.50
  AND rov_port_revs_demand = stop
THEN  class = Port_Ths_Half_Ahead  [11 0 0]
ELSE
IF    rov_port_revs_demand = stop
  AND rov_stbd_revs_demand = h_astn
THEN  class = Port_Ths_Half_Ahead  [6 0 0]
ELSE
(DEFAULT) class = NO_KEY  [147 139 158]

1033 examples!
        PREDICTED 
ACTUAL     Port_Th Stbd_Th NO_KEY  Accuracy 
Port_Ths  44.00    0.00  150.00     22.7 %
Stbd_Ths   0.00   18.00  167.00      9.7 %
  NO_KEY   0.00    0.00  654.00    100.0 %
Overall accuracy: 69.3 %

444 examples!
        PREDICTED 
ACTUAL     Port_Th Stbd_Th NO_KEY  Accuracy 
Port_Ths   7.00    1.00   53.00     11.5 %
Stbd_Ths   3.00    1.00   59.00      1.6 %
  NO_KEY  19.00    4.00  297.00     92.8 %
Overall accuracy: 68.7 %


The default rule accuracy in these cases would be 654 / 1033 = 63.3 % and 320 / 444 = 72.0 %. The better relative accuracy of the first set can be easily explained, as that was the training set, i.e., the set of data from which the rules were derived in the first place.



**RULE FILE**
@
Examples: RT2s09a.exs
Algorithm: ORDERED
Error_Estimate: LAPLACIAN
Threshold: 10.00
Star: 10
@

*ORDERED-RULE-LIST*

IF    sub_display = ship
THEN  class = NO_KEY  [0 0 224]
ELSE
IF    -10.50 < rov_off_head < 11.00
THEN  class = NO_KEY  [0 0 55]
ELSE
IF    rov_height < 52.30
  AND rov_speed > 1.68
  AND rov_r < 0.00
  AND rov_target_range > 49.60
THEN  class = NO_KEY  [0 0 29]
ELSE
IF    rov_off_head < -30.50
  AND rov_height > 4.20
  AND rov_speed > 0.09
  AND rov_r < 0.01
THEN  class = Pure_Turn_Port  [0 17 0]
ELSE
IF    rov_off_head > 39.50
  AND rov_height < 40.20
  AND rov_speed < 1.33
  AND rov_target_range < 133.35
THEN  class = Pure_Turn_Stbd  [14 0 0]
ELSE
IF    rov_target_range < 6.25
  AND rov_av_revs_demand = stop
THEN  class = NO_KEY  [0 0 7]
ELSE
IF    rov_off_head > 15.00
  AND 0.02 < rov_speed < 0.34
THEN  class = Pure_Turn_Stbd  [9 0 0]
ELSE
IF    rov_off_head < -12.50
  AND rov_r > -0.09
  AND rov_target_range > 6.35
THEN  class = NO_KEY  [0 0 7]
ELSE
(DEFAULT) class = Pure_Turn_Stbd  [11 6 9]

388 examples!
        PREDICTED 
ACTUAL     Pure_Tu Pure_Tu NO_KEY  Accuracy 
Pure_Tur  34.00    0.00    0.00    100.0 %
Pure_Tur   6.00   17.00    0.00     73.9 %
  NO_KEY  14.00   16.00  301.00     90.9 %
Overall accuracy: 90.7 %

222 examples!
        PREDICTED 
ACTUAL     Pure_Tu Pure_Tu NO_KEY  Accuracy 
Pure_Tur   5.00    2.00    2.00     55.6 %
Pure_Tur   1.00    7.00    4.00     58.3 %
  NO_KEY   5.00    5.00  191.00     95.0 %
Overall accuracy: 91.4 %


Again, we can easily calculate the performance of the default rule. In the first case it is 331 / 388 = 85.3 % and in the second case (not training data) it is 201 / 222 = 90.5 %.


| General Contents | Next Appendix C |
html version © 1995 Simon Grant email a@simongrant.org