| © 1990 | section list B: Different representations Overview
| Previous Appendix A | Next Appendix B.2 |

A small case study of differing representations

First analysis of ROV turn actions with CN2

These are rules obtained with the representation RT01, from data generated by the author. All the material in typewriter font has been output in that form by one of the programs. Many lines of output have been taken out, but what is left has not been altered. Inconsistencies are due to the different versions of the programs used as program development proceeded. The rules are presented here in order to illustrate the operation of CN2, and the general nature of the induced rules. However, these rules are not presented as plausible candidates for rules that humans might use. The figures in square brackets indicate how many of each class is covered by that rule. Thus, [15 0 0] means that all 15 of the examples falling into the category defined by the three conditions have Port_Ths_Half_Ahead as their action decision class. Similarly, [23 11 14] indicates that there were 48 examples within the scope of the two conditions, and of those, 23 had class Port_Ths_Half_Ahead, 11 had class Stbd_Ths_Half_Ahead and 14 had the class value NO_KEY. This latter rule is less accurate than the former one.

The larger the numbers, the broader the coverage, and the more the numbers are other than in the appropriate place, the less accurate is the rule.



     *------------------------*
     |  UN-ORDERED RULE LIST  |
     *------------------------*

IF    0.65 < rov_speed < 2.33
  AND rov_port_revs_demand = stop
  AND rov_stbd_revs_demand = h_ahd
THEN  class = Port_Ths_Half_Ahead  [15 0 0]

IF    rov_height > 1.80
  AND rov_port_revs_demand = stop
  AND rov_stbd_revs_demand = h_astn
THEN  class = Port_Ths_Half_Ahead  [7 0 0]

IF    rov_degrees < 31.50
  AND rov_speed > 0.31
  AND rov_target_range < 10.10
THEN  class = Port_Ths_Half_Ahead  [7 0 0]

IF    rov_target_range > 137.35
  AND sub_display = rov
THEN  class = Port_Ths_Half_Ahead  [23 11 14]

IF    rov_target_range < 56.75
  AND rov_port_revs_demand = f_ahd
THEN  class = Port_Ths_Half_Ahead  [16 12 10]

IF    rov_target_head > 135.00
  AND rov_speed > 0.22
  AND rov_r < 0.17
  AND 6.75 < rov_target_range < 7.45
  AND sub_display = rov
THEN  class = Port_Ths_Half_Ahead  [7 0 0]

IF    rov_height > 31.75
  AND rov_port_revs_demand = f_ahd
THEN  class = Port_Ths_Half_Ahead  [36 25 36]

IF    rov_target_range < 34.40
THEN  class = Port_Ths_Half_Ahead  [89 79 148]

IF    rov_height < 17.05
  AND rov_speed > 0.48
  AND rov_port_revs_demand = h_ahd
  AND rov_stbd_revs_demand = stop
THEN  class = Stbd_Ths_Half_Ahead  [0 15 0]

IF    rov_speed < 0.58
  AND 0.13 < rov_r < 0.31
  AND rov_target_range > 5.00
  AND rov_stbd_revs_demand = stop
THEN  class = Stbd_Ths_Half_Ahead  [0 12 0]

IF    rov_target_range < 59.80
  AND rov_port_revs_demand = h_ahd
  AND rov_stbd_revs_demand = f_ahd
THEN  class = Stbd_Ths_Half_Ahead  [0 7 0]

IF    rov_target_head < 243.00
  AND rov_port_revs_demand = h_astn
  AND rov_stbd_revs_demand = stop
THEN  class = Stbd_Ths_Half_Ahead  [0 6 0]

IF    rov_r > -0.01
  AND rov_target_range < 32.60
  AND rov_stbd_revs_demand = f_ahd
THEN  class = Stbd_Ths_Half_Ahead  [1 5 0]

IF    rov_degrees < 104.00
  AND rov_stbd_revs_demand = f_ahd
THEN  class = Stbd_Ths_Half_Ahead  [10 27 21]

IF    rov_target_range > 124.15
  AND sub_display = rov
THEN  class = Stbd_Ths_Half_Ahead  [38 37 36]

IF    5.45 < rov_target_range < 10.50
THEN  class = Stbd_Ths_Half_Ahead  [35 36 52]

IF    rov_target_range < 97.15
  AND rov_stbd_revs_demand = f_ahd
THEN  class = Stbd_Ths_Half_Ahead  [29 41 35]

IF    sub_display = ship
THEN  class = NO_KEY  [0 0 340]

IF    sub_display = umb
THEN  class = NO_KEY  [0 0 61]

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]

(DEFAULT) class = NO_KEY  [194 185 654]


And these are the results of testing those rules, first with the data from which they were derived, and second from another similar set of data. The default rule accuracy in these cases would be 654 / 1033 = 63.3 % and 320 / 444 = 72.0 %.



        PREDICTED 
ACTUAL     Port_Th Stbd_Th NO_KEY  Accuracy 
Port_Ths  79.00   21.00   94.00     41 %
Stbd_Ths  56.00   38.00   91.00     21 %
  NO_KEY  85.00   34.00  535.00     82 %
Overall accuracy: 63 %

        PREDICTED 
ACTUAL     Port_Th Stbd_Th NO_KEY  Accuracy 
Port_Ths  31.00    9.00   21.00     51 %
Stbd_Ths  42.00    5.00   16.00      8 %
  NO_KEY  60.00   16.00  244.00     76 %
Overall accuracy: 63 %


The same original data, rerepresented and given to the same algorithm, produces the following, shorter, rules.

     *------------------------*
     |  UN-ORDERED RULE LIST  |
     *------------------------*

IF    rov_off_head > 43.00
  AND rov_height < 40.20
  AND rov_speed < 1.33
  AND rov_target_range < 133.35
  AND sub_display = rov
THEN  class = Pure_Turn_Stbd  [14 0 0]

IF    rov_off_head > 8.50
  AND 6.25 < rov_target_range < 7.60
THEN  class = Pure_Turn_Stbd  [6 0 0]

IF    rov_off_head > 29.50
  AND rov_height > 34.45
  AND rov_speed < 1.15
  AND rov_target_range > 121.75
  AND sub_display = rov
  AND rov_turn_demand = strait
THEN  class = Pure_Turn_Stbd  [12 0 0]

IF    10.85 < rov_height < 42.95
  AND rov_speed < 0.15
THEN  class = Pure_Turn_Stbd  [5 1 0]

IF    rov_off_head < -29.50
  AND rov_height > 4.20
  AND 0.09 < rov_speed < 2.85
  AND sub_display = rov
THEN  class = Pure_Turn_Port  [0 17 0]

IF    sub_display = ship
THEN  class = NO_KEY  [0 0 224]

IF    -10.50 < rov_off_head < 11.00
THEN  class = NO_KEY  [0 0 73]

(DEFAULT) class = NO_KEY  [34 23 331]


The performance of these rules looks better, but in fact this is due to the greater proportion of NO_KEY events. The overall accuracy is still very similar to the performance of the default rule by itself.



        PREDICTED 
ACTUAL     Pure_Tu Pure_Tu NO_KEY  Accuracy 
Pure_Tur  34.00    0.00    0.00    100 %
Pure_Tur   6.00   17.00    0.00     74 %
  NO_KEY  52.00    0.00  279.00     84 %
Overall accuracy: 85 %

        PREDICTED 
ACTUAL     Pure_Tu Pure_Tu NO_KEY  Accuracy 
Pure_Tur   8.00    1.00    0.00     89 %
Pure_Tur   7.00    4.00    1.00     33 %
  NO_KEY  17.00    2.00  182.00     91 %
Overall accuracy: 87 %


The accuracy of the default rule in the first case (training examples) is 85.3 %. In the second case (test examples), it is 201 / (9 + 12 + 201) = 201 / 222 = 90.5%


| General Contents | Next Section B.2 |
html version © 1995 Simon Grant email a@simongrant.org