• No results found

as they were learned only from subsets of the complete dataset. We are not suggesting to learn from smaller datasets in order to seek a lower range of length of examples.

6.4

Computational Cost

6.4.1 Motivation

While conducting the experiments discussed earlier in this chapter (Section 6.2 and 6.3) we observed that it takes Aleph longer to learn models using our L-modified evaluation functions than it took using the benchmark evaluation function. We decided to investigate the cause of the increase in time.

The first factor which causes this increase in time is that our L-Modified Functions require more computation. Aleph keeps track of the number of positive and negative examples covered by the clause to be evaluated and passes these values on to the predicate that is to evaluate the given clause. The benchmark function only uses these values to compute a score. However our L-modified Function requires L-modified coverage to calculate the score and does not use the values passed on by Aleph. Instead it calls our special predicates (See Section 5.9) to calculate its own L-modified coverage.

Each time Aleph uses the user defined Function to evaluate a clause, it will make two calls to the predicate compute Lmodcover/3, (See Table 5.7 page 61); once for positive and once for random examples. Calling compute Lmodcover/3 involves, among other things, the parsing of several examples through the predicate parse exple for length/3 to compute the L-modified coverage.

This extra computational work, which is necessary for the computation of L-modified Functions, accounts for some of the increased time needed when comparing with the benchmark. However, we also decided to investigate the possibility that more nodes are constructed using our L-modified evaluation function. Given that our Function results in grammars with better performance, we expect it to be more selective when it comes to accepting clauses, thus more clauses might be constructed before Aleph is satisfied with the learning process.

6.4. Computational Cost 74 6.4.2 Methodology

Just as in Section 6.2 we run Aleph using the benchmark Function 6.1 and all three L- modified clause evaluation functions 6.2, 6.3 and 6.4. However, this time we specify several different values for maximum number of nodes in the input settings file. Aleph uses an input parameter, called setNodes, to limit how many nodes can be constructed during each search. The standard value for setNodes, which we used in all our other experiments is 100000. For this experiment however, we decrease that value several times and observe the performance of the resulting model. The different values for setNodes are: 100000, 50000, 10000, 5000, 1000.

As input for Aleph, we provide:

• the Background Knowledge given in Section 5.2,

• the pruning predicates, mode declarations and type declarations discussed in Section 5.3,

• the NPP-middles dataset described in Section 5.5, containing positive and random examples.

Whenever Aleph has finished learning and comes up with a theory, it returns the total amount of nodes constructed during the search. This number indicates the total number of nodes that were constructed in order to learn the resulting grammar, meaning: the sum of the number of nodes that were constructed in order to learn each individual clause of that grammar. We record this number for each experiment.

After learning, we test the resulting biological grammars following the 5-fold stratified cross validation testing strategy that was explained in Section 5.7. Using the results of these tests, we finally evaluate the performance of our biological grammars using precision, recall and F-measure as described in Section 5.8.

6.4. Computational Cost 75

Figure 6.2: The setNodes parameter plotted against the total nodes constructed during learning of a model for all four clause evaluation functions.

6.4.3 Results

Total nodes constructed

Table 6.6 contains the total nodes constructed for each setNodes and each evaluation function. Figure 6.2 shows the data in Table 6.6 plotted on a graph which shows the total number of nodes constructed against the setNodes parameter for each evaluation function.

Functions setNodes 6.1 6.2 6.3 6.4 100000 662299 1885723 1885723 1903029 50000 464489 1172399 1172399 1179706 10000 139747 299747 299747 305747 5000 67000 156000 156000 156000 1000 10000 24000 24000 2000

Table 6.6: Mean total number of nodes constructed to learn a grammar.

Performance

Table 6.7 shows the means and standard derivations of True Positives, False Positives, True Randoms and False Randoms that were covered by the learned theories on the test sets.

6.4.4 Evaluation and Discussion

Table 6.8 gives the performance of the grammars learned in each experiment. The values in the table are derived from the results given in Table 6.7. Figure 6.3 shows the performance using each of the clause evaluation functions against the decreasing setNodes.

6.4. Computational Cost 76 SetNodes: 100000 Function TP sd.TP FP sd.FP TN sd.TN FN sd.FN 6.1 10 2.12 130.4 72.44 451.2 72.28 5.2 2.39 6.2 7.8 2.39 5.8 1.93 575.8 1.79 7.4 2.61 6.3 7.8 2.39 5.8 1.93 575.8 1.79 7.4 2.61 6.4 7.8 2.39 5.8 2.39 575.8 2.289 7.4 2.61 SetNodes: 50000 6.1 10 2.12 129 73.72 452.6 73.54 5.2 2.39 6.2 7.8 2.39 6.4 2.7 575.2 2.59 7.4 2.61 6.3 7.8 2.39 6.4 2.7 575.2 2.59 7.4 2.61 6.4 7.8 2.39 6.4 3.21 575.2 3.11 7.4 2.61 SetNodes: 10000 6.1 10.2 1.79 214.4 75.14 367.2 75.19 5 2.12 6.2 9.2 2.59 48.6 14.15 533 13.77 6 2.74 6.3 9.2 2.59 48.6 14.15 533 13.77 6 2.74 6.4 9.2 2.59 47.6 16.79 534 16.42 6 2.74 SetNodes: 5000 6.1 10 1.87 229.6 62.92 352 62.96 5.2 2.17 6.2 9.2 1.92 79.8 14.62 501.8 14.08 6 2.12 6.3 9.2 1.92 79.8 14.62 501.8 14.08 6 2.12 6.4 9.4 2.3 87 16.94 494.6 16.46 5.8 2.49 SetNodes: 1000 6.1 13.6 1.52 358.8 69.37 222.8 69.13 1.6 1.52 6.2 12.2 2.28 344 82.46 237.6 82.54 3 2.45 6.3 12.2 2.28 344 82.46 237.6 82.54 3 2.45 6.4 15.2 0.45 581.6 0.55 0 0 0 0

Table 6.7: TP: Mean True Positives, FP: Mean False Positives, TR: Mean True Randoms and FR: Mean False Randoms for each setNodes parameter and each clause evaluation function.

Figure 6.3 shows the graph plotting the performance of the evaluation functions against the total number of nodes constructed. We can see that when more nodes are constructed, then grammars with better performance are learned.

We have observed in all our experiments that, when using the L-modified Functions 6.2, 6.3 and 6.4, the induction process takes longer than when using the benchmark Function 6.1. From the data given in Table 6.6 we can see that a learning process using the default setNodes value and the benchmark Function needs to construct around 660,000 nodes in total to learn a theory, while around 1,900,000 were constructed using the L-modified Functions. A similar trend is observed if the setNodes parameter is reduced. In Figure 6.2 we can see that the experiment using the benchmark Function 6.1 constructs far less

6.4. Computational Cost 77 SetNodes Function Accuracy Precision Recall F-measure

100000 6.1 0.77 0.07 0.66 0.13 6.2 0.98 0.57 0.51 0.54 6.3 0.98 0.57 0.51 0.54 6.4 0.98 0.57 0.51 0.54 50000 6.1 0.78 0.07 0.66 0.13 6.2 0.98 0.55 0.51 0.53 6.3 0.98 0.55 0.51 0.53 6.4 0.98 0.55 0.51 0.53 10000 6.1 0.63 0.05 0.67 0.09 6.2 0.91 0.16 0.61 0.25 6.3 0.91 0.16 0.61 0.25 6.4 0.91 0.16 0.61 0.26 5000 6.1 0.61 0.04 0.66 0.08 6.2 0.86 0.1 0.61 0.18 6.3 0.86 0.1 0.61 0.18 6.4 0.84 0.1 0.62 0.17 1000 6.1 0.4 0.04 0.89 0.07 6.2 0.42 0.03 0.80 0.07 6.3 0.42 0.03 0.8 0.07 6.4 0.03 0.03 1 0.05

Table 6.8: Performance of each evaluation function with relation to the setNodes param- eter.

Figure 6.3: For each evaluation function the performance is plotted against the setNodes parameter.

nodes that the experiment using the L-modified Functions. It is not surprising that with the decrease of the setNodes parameter comes a decrease of the nodes constructed. We can observe a similar behaviour for the performance of the learned theories in Figure 6.3. Figure 6.4 shows the performance plotted against the total number of nodes constructed

6.5. Search Time vs. Length of Examples 78

Related documents