• No results found

5.3 Case Study: Detection of Diabetes

5.3.2 Comparison Between GP and GP with CPS

Two types of experiments are performed for comparison, one with smaller num- ber of generations, having bigger population size (Exp-1), and the other with relatively larger number of generations but with smaller population size (Exp-2). The number of generations for Exp-1 is 125 with a population of 100 individuals while the number of generations for Exp-2 is 200 with a population size of 25. Both of these experiments were conducted for diabetes classification using the full diabetes dataset. All the other parameters of GP for these experiments are given in Table 5.1.

The results of the Exp-1 are shown in Figure 5.6 which shows the comparison between GP and GP with CPS in terms of fitness value where a lower fitness means better classification. GP was evolved 40 times and each point on the curve is an average of 40. It is clear from the Figure that the fitness of GP with CPS is lower compared to the GP, although, the difference between the final fitness values is not huge. An important observation is that the fitness value of the standard GP is settling at the end of the generations while the fitness value of GP with CPS is still decreasing. In order to investigate if the fitness continues to decrease (which means better performance), if allowed to go over more generations, Exp-2 was performed.

Figure 5.7 shows the results of Exp-2. For the first 75 generations GP performs better compared to GP with CPS, however, post 75 generations GP with CPS performs better. The final fitness achieved by GP with CPS is better compared to GP. The improvement in fitness is marginal but we will see later that this marginal improvement will be significant in terms of classification accuracy. An

5.3. CASE STUDY: DETECTION OF DIABETES 81 −3 −2 −1 0 1 2 3 4 5 6 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 (mean(class1) + (k*std(class1))) Class 1 Class 2 (mean(class2) - (k*std(class2)))

Figure 5.5: Binary string evaluation for diabetes problem

interesting point to note from this Figure is that after about 75 generations, the standard GP seems to have locked in and there is hardly any improvement in fitness upto 200th generation. It is believed that this lack of improvement after 75 generations is due to the reason that GP lacks the genetic material which can help to solve some of the training cases. In contrast GP with CPS finds a way to improve the fitness and does not get locked in due to the fact that it maintains a diverse population throughout the evolution, capable of solving all the training cases [64].

In order to demonstrate the effectiveness of GP with CPS in terms of classi- fication accuracy, the solutions produced by GP with CPS and GP were tested using KNN classifier. The data was divided into 90% and 10% training and test data. Both GP variations were evolved 40 times for the training data and 40 solutions produced were tested with test data using KNN classifier. The training data was used by KNN classifier as reference samples. The classification accuracy is defined as

Classification Accuracy (%) = T P +T N

T P +F P +T N +F N (5.5) where T P is the number of patients (diabetes) detected as patient, F P is the number of healthy persons detected as patient, T N is the number of healthy persons detected as healthy andF N is the number of patients detected as healthy.

5.3. CASE STUDY: DETECTION OF DIABETES 82

Table 5.1: Parameters used for the experimental work

Parameter Standard Value

Number of Generations 125, 200 (Exp-1, Exp-2) Population Size 100, 25 (Exp-1, Exp-2)

Function Pool

(plus, minus, times, mydivide, mysquare, mysqrt, reciprocal, sin, cos, myasin, myacos, tan, tanh, negator, abs, mylog)*

Terminal Pool 8 attributes

Genetic Operator Crossover, Mutation Operator Probability 0.6, 0.4

Tree Generation Ramped half-and-half Initial Maximum Depth 6

Maximum Depth 28 Selection Operator Roulette Elitism Half-elitism

* All the functions starting with ”my” are protected functions.

Number of generations F it n es s v a lu e 0 20 40 60 80 100 120 140 0.9 1 1.1 1.2 1.3 1.4 GP with CPS GP

Figure 5.6: Average fitness of the best of generations for 125 generations averaged over 40 runs using a population of 100.

5.3. CASE STUDY: DETECTION OF DIABETES 83 Number of generations F it n es s v a lu e 0 20 40 60 80 100 120 140 160 180 200 1 1.5 2 2.5 3 GP with CPS GP

Figure 5.7: Average fitness of the best of generations for 200 generations averaged over 40 runs using a population of 25.

Table 5.2: Comparison of the classification accuracies using GP and GP with CPS Method Accuracy (%) ± Std GP (Exp-1) 78.2 ± 2.5 GP (Exp-2) 78.4 ± 2.5 GP with CPS (Exp-1) 79.1 ± 2.1 GP with CPS (Exp-2) 79.7 ± 2.0

The results for Exp-1 and Exp-2 are summarised in Table 5.2. The classifi- cation accuracy (written as accuracy in the Table) as well as standard deviation (std) for each experiment is given in the Table. The classification accuracy for GP with CPS is better compared to GP in both the cases. Moreover, the standard deviation is also lower which makes GP with CPS more robust.

Complexity comparison between GP and GP with CPS

The additional computations added by CPS are the evaluation of the binary string and the calculation ofPc. Although, these two quantities add extra computations

to GP, the binary nature of both of these quantities does not add much to the computational complexity when compared to other methods present in literature for evaluation of phenotype behaviour. There are two ways the additional com- plexity added by CPS can be compared with GP, i) additional memory required, and ii) additional time required.

5.3. CASE STUDY: DETECTION OF DIABETES 84 parameters related to that individual, e.g., fitness value, number of nodes, origin of creation, string representation of tree, tree depth, etc. The additional memory required by CPS process is for storing binary string of each individual. The additional memory requirement (in bits) introduced by binary string ism =NB, where N is the population size and B is the length of the binary string of one individual. Considering the memory cost of all other parameters related to an individual, the additional cost introduced by the binary string is marginal.

The second cost added by CPS is the additional time required to evaluate the binary string and to find the right partner during CPS operation. For Exp-1 (in the previous section), the average time taken for training one GP run was about nine minutes for standard GP and about 11 minutes for GP with CPS. It is clear from this that the additional resources required for CPS are on average less than 20% in terms of computation. Most researchers agree that the biggest portion of time during evolution is spent during fitness evaluation of any generation (as demonstrated in the next section) and it is more significant for complex prob- lems. Since diabetes detection is also a complex problem (as demonstrated by achieved classification accuracies), the additional resources required by CPS are negligible in comparison. In a nutshell, the additional complexity introduced by CPS process is marginal compared to other processes involved in GP algorithm.