**3. Eye Diseases Diagnosis**

We developed a clinical decision support system which bases its diagnosis on the patient complain, symptoms and physical eye examinations, and uses multilayer feedforward net‐ works with a single hidden layer. Backpropagation algorithm is employed for training the networks in a supervised mode.

The eye diseases selected for diagnosis are as shown in table1. The designed neural network consists mainly of three layers: an input layer, a single hidden layer, and an output layer. The input layer has a total of 22 inputs plus the fixed bias input. These inputs consist of pa‐ tient complaint, symptoms and physical eye examinations as may either be observed by the ophthalmologist or complained by the patients (i.e. X1, X2,..., X22). The output layer consists of 12 outputs indicating the diagnosed diseases (i.e. d1, d2,..., d13). Table1 shows the select‐ ed eye diseases for diagnosis and their symptom and signs as may be complained by patient or observed by the specialist while table2 shows the input variables for the system.

We ran 10 trial experiments with randomly selected 80% of the available data for training and the remaining 20% for testing the networks generalization performance. The learning rate of the network in gradient descent learning was 0.5. The network topology used was as follows: 22 neurons in the input layer for each symptom and signs for the eye disease, 9 neu‐ rons in the hidden layer and 13 neurons in the output layer representing each eye disease as shown in Fig. 2. We carried out some sample experiments on the number of hidden neurons to be used in the networks for this application. The results demonstrate that 9 neurons in the hidden layer were sufficient for the network to learn the training samples. The neural net‐ work was trained until one of the three following stopping criteria was satisfied:



**Figure 10.** Corneal ulcer (Source: http://www.medicinenet.com/eye\_diseases\_pictur\_slideshow/article.htm#).

We developed a clinical decision support system which bases its diagnosis on the patient complain, symptoms and physical eye examinations, and uses multilayer feedforward net‐ works with a single hidden layer. Backpropagation algorithm is employed for training the

The eye diseases selected for diagnosis are as shown in table1. The designed neural network consists mainly of three layers: an input layer, a single hidden layer, and an output layer. The input layer has a total of 22 inputs plus the fixed bias input. These inputs consist of pa‐ tient complaint, symptoms and physical eye examinations as may either be observed by the ophthalmologist or complained by the patients (i.e. X1, X2,..., X22). The output layer consists of 12 outputs indicating the diagnosed diseases (i.e. d1, d2,..., d13). Table1 shows the select‐ ed eye diseases for diagnosis and their symptom and signs as may be complained by patient

We ran 10 trial experiments with randomly selected 80% of the available data for training and the remaining 20% for testing the networks generalization performance. The learning rate of the network in gradient descent learning was 0.5. The network topology used was as follows: 22 neurons in the input layer for each symptom and signs for the eye disease, 9 neu‐ rons in the hidden layer and 13 neurons in the output layer representing each eye disease as shown in Fig. 2. We carried out some sample experiments on the number of hidden neurons to be used in the networks for this application. The results demonstrate that 9 neurons in the hidden layer were sufficient for the network to learn the training samples. The neural net‐

**1.** On 100% of the training examples, the activation of every output unit was within 0.2 of

**3.** a network classified at least 98% of the training examples correctly, but had not im‐

or observed by the specialist while table2 shows the input variables for the system.

work was trained until one of the three following stopping criteria was satisfied:

**3. Eye Diseases Diagnosis**

72 Advances in Expert Systems

networks in a supervised mode.

the desired output, or

**2.** a network had been trained for 500 epochs, or

proved it's ability to classify the training after ten epochs


*Oj*

*Ej*

are the inputs, *w ji*

ed outputs and η - learning rate.

fication using neural networks.

**4. Experimental Results**

**4.1. Data Set**

Where: *xi*

gram.

(*x*¯, *<sup>w</sup>*¯)= <sup>1</sup> 1 + *e*

<sup>∆</sup>*<sup>w</sup> ji* <sup>=</sup>*η*( <sup>∂</sup> *<sup>E</sup>*

∂ *w ji*

**Figure 11.** The neural network topology used for diagnosing the eye diseases which contain attribute information of 22 signs and symptoms. Each neuron in the input layer represents a particular sign or symptom. The neurons in the output layer represent the eye disease. Please note that all weight link interconnections are not shown in this dia‐

In this work, we used the C++ programming language in programming neural networks. Data mining and machine learning software tools such as 'Weka' can also be used for classi‐

The data set used for the training and testing of the system was collected from Linsolar Eye Clinic, Port Harcourt and Odadiki eye clinic, Port Harcourt all in Nigeria. The total data is 400 from which 320 samples (80%) are randomly chosen and used as training patterns and tested with 80 instances (20%) of the same data set. The data set consist of evenly distributed men and women. Samples also consider age randomly collected from 18 years to 70 years.

(*x*¯, *<sup>w</sup>*¯)−*dj*

(*x*¯, *<sup>w</sup>*¯, *<sup>d</sup>*)=∑(*Oj*

are the weights, *O <sup>j</sup>*

*Aj*(*x*¯, *<sup>w</sup>*¯) (4)

Neural Networks and Decision Trees For Eye Diseases Diagnosis

) (6)

(*x*, *w*)are the actual outputs, *d <sup>j</sup>*

)<sup>2</sup> (5)

http://dx.doi.org/10.5772/51380

75

are the expect‐

#### **Table 2.** Input Variables and their Meaning.

The backpropagation algorithm with supervised learning was used, which means that we provide the algorithm with examples of the inputs and outputs we want the network to compute, and then the error (difference between actual and expected results) is calculated. The idea is to reduce this error, until the ANN learns the training data. The training begins with random weights, and the goal is to adjust them so that the error will be minimal. The activation function of the artificial neurons in ANNs implementing the backpropagation al‐ gorithm is given as follows[33]:

$$A\_j(\overline{\mathbf{x}}, \; \overline{w}) = \sum\_{i \neq 0} \mathbb{1}\_{i \neq 0} \mathbf{x}\_i \cdot \mathbf{w}\_{ji} \tag{3}$$

Neural Networks and Decision Trees For Eye Diseases Diagnosis http://dx.doi.org/10.5772/51380 75

$$O\_j(\overline{\chi}, \ \overline{w}) = \frac{1}{\prod\_{1 \sim e^{-\overline{\chi}}(\overline{\chi}, \ \overline{w})} \prod} \tag{4}$$

$$E\_{\bar{\jmath}}\{\bar{\bf x}, \,\,\overline{w}, \,\,d\} = \sum \{O\_{\bar{\jmath}}(\bar{\bf x}, \,\,\overline{w}) - d\_{\bar{\jmath}}\}^2 \tag{5}$$

$$
\Delta \varpi w\_{j\bar{l}} = \eta \left( \frac{\partial E}{\partial w\_{j\bar{l}}} \right) \tag{6}
$$

Where: *xi* are the inputs, *w ji* are the weights, *O <sup>j</sup>* (*x*, *w*)are the actual outputs, *d <sup>j</sup>* are the expect‐ ed outputs and η - learning rate.

**Figure 11.** The neural network topology used for diagnosing the eye diseases which contain attribute information of 22 signs and symptoms. Each neuron in the input layer represents a particular sign or symptom. The neurons in the output layer represent the eye disease. Please note that all weight link interconnections are not shown in this dia‐ gram.

In this work, we used the C++ programming language in programming neural networks. Data mining and machine learning software tools such as 'Weka' can also be used for classi‐ fication using neural networks.

#### **4. Experimental Results**

#### **4.1. Data Set**

**Input variables Variable Meaning** X1 Pains in the eye

74 Advances in Expert Systems

X4 Poor night vision

X8 Blurred vision

X10 Distorted vision

X2 Redness or pink color of eye

X7 Age greater than 45 years

X15 Trouble discerning colors

X18 Swelling of eye

**Table 2.** Input Variables and their Meaning.

gorithm is given as follows[33]:

X17 Watering or discharge from eye

X19 Steamy appearing cornea of eye X20 Sensitivity to light (photophobia) X21 Blurred vision for distant objects X22 Blurred vision for close objects

*Aj*

(*x*¯, *<sup>w</sup>*¯)=<sup>∑</sup> *<sup>i</sup>*=0

X5 Family histories of the eye problem X6 Decrease in peripheral field of view

X9 Blurred vision improves with eye blinking

X11 Cloudy substance formed in front of eye lens

X12 Slow recovery of vision after exposure to bright light X13 Irritation, itchy, scratchy or burning sensation of eye X14 Discomfort after long concentration use of eye

X16 Floaters in eye, flashes of light, halos around light

The backpropagation algorithm with supervised learning was used, which means that we provide the algorithm with examples of the inputs and outputs we want the network to compute, and then the error (difference between actual and expected results) is calculated. The idea is to reduce this error, until the ANN learns the training data. The training begins with random weights, and the goal is to adjust them so that the error will be minimal. The activation function of the artificial neurons in ANNs implementing the backpropagation al‐

*<sup>n</sup> xi* ⋅*w ji* (3)

X3 Bright light or antiglare sunglasses improves vision

The data set used for the training and testing of the system was collected from Linsolar Eye Clinic, Port Harcourt and Odadiki eye clinic, Port Harcourt all in Nigeria. The total data is 400 from which 320 samples (80%) are randomly chosen and used as training patterns and tested with 80 instances (20%) of the same data set. The data set consist of evenly distributed men and women. Samples also consider age randomly collected from 18 years to 70 years.

#### **4.2. Rule Extraction from the ANN**

As in Figure 12 it can be seen that both decision trees and neural networks can be easily con‐ verted into *IF THEN Rules* or we can simply convert neural networks into decision trees. In this work we use the networks architecture as shown in figure11 together with backpropa‐ gation algorithm with supervise learning.

These rule sets are easily explain to means:

*THEN* the eye problem is *Cornel Ulcer*

use of eye *THEN* the eye problem is *Uveitis*

problem is *Glaucoma*

**Figure 13.** Decision tree for some the eye disease.

*Pink Eye*.

**1.** *IF* there is pains and redness of eye and swelling of eye and eye is sensitive to bright light and there is blurred vision and cloudy substance are formed in front of eye lens

Neural Networks and Decision Trees For Eye Diseases Diagnosis

http://dx.doi.org/10.5772/51380

77

**2.** *IF* there is pains and redness of eye and no swelling of eye and there are floater or flash‐ es of light and eye is sensitive to bright light and there is blurred vision and the blurred vision improves with blinking of eye and there is discomfort after long concentrated

**3.** IF there is pains and redness of eye and no swelling of eye and there are floater or flash‐ es of light and there are decrease in peripheral field of view and there is recorded fami‐ ly history of the eye problem and patient age is greater than 45 years *THEN* the eye

**4.** *IF* there is no pains or redness of the eye and there is blurred and distorted vision and there is recorded history of the family history of the eye problem and slow recovery of vision after exposure to bright light *THEN* the eye problem is *Muscular Degeneration*

**5.** *IF* there is no pains of the eye and the eye is red and there is blurred vision and the eye is itchy or scratchy and there is watering discharge of the eye *THEN* the eye problem is

Figure 13 shows an illustration of the extracted decision tree for some of the eye diseases.

Decision trees are machine learning tool for building a tree structure from a training dataset. A Decision tree learns by starting at the root node and select the best attributes which splits the training data [13]. Compared to neural networks they can explain how they arrive to a particular solution [34]. Hence, it usefulness in clinical decision support system as it may be use to support the expert in his delicate decision making or use as training tools for younger ophthalmologists. A typical decision tree extracted from the neural network in this work is shown in Figure 13.

To simplify complicated drawing the input variables that was shown in table1 may be com‐ bined to form conjunctions and negations which may also be used to generate the Decision Tree for some of the eye diseases as shown in Table 3.

**Figure 12.** Extracting decision trees from neural networks.


**Table 3.** Some Additional variables for the Decision Tree.

The following rule sample sets are then obtained from the decision tree of Figure 13:


These rule sets are easily explain to means:

**4.2. Rule Extraction from the ANN**

shown in Figure 13.

76 Advances in Expert Systems

gation algorithm with supervise learning.

Tree for some of the eye diseases as shown in Table 3.

**Figure 12.** Extracting decision trees from neural networks.

**Table 3.** Some Additional variables for the Decision Tree.

As in Figure 12 it can be seen that both decision trees and neural networks can be easily con‐ verted into *IF THEN Rules* or we can simply convert neural networks into decision trees. In this work we use the networks architecture as shown in figure11 together with backpropa‐

Decision trees are machine learning tool for building a tree structure from a training dataset. A Decision tree learns by starting at the root node and select the best attributes which splits the training data [13]. Compared to neural networks they can explain how they arrive to a particular solution [34]. Hence, it usefulness in clinical decision support system as it may be use to support the expert in his delicate decision making or use as training tools for younger ophthalmologists. A typical decision tree extracted from the neural network in this work is

To simplify complicated drawing the input variables that was shown in table1 may be com‐ bined to form conjunctions and negations which may also be used to generate the Decision

**Input variables Variable Meaning Input variables Variable Meaning** NOT X1 No pains in eye NOT X18 No swelling of eye X1 and X2 Pains and redness of eye X1 and X18 Pains and swelling of eye

The following rule sample sets are then obtained from the decision tree of Figure 13: **1.** *IF* (X1 AND X2) and X18 and X20 and X8 and X11 and X17 *THEN* Cornel Ulcer

**3.** *IF* (X1 AND X2) and NOTX18 and X16 and X6 and X5 and X7 *THEN* Glaucoma

**4.** *IF* NOTX1 and X8 and X10 and X5 and X12 *THEN* Muscular Degeneration

**5.** *IF* NOTX1 and X8 and X2 and X13 and X17 *THEN* Pink Eye

**2.** *IF* (X1 AND X2) and NOTX18 and X16 and X20 and X8 and X9 and X14 *THEN* Uveitis


Figure 13 shows an illustration of the extracted decision tree for some of the eye diseases.

**Figure 13.** Decision tree for some the eye disease.

#### **4.3. Performance Analysis of the system**

To justify the performance of our diagnostic system, we conducted two analyses. The first is using a general performance scheme. Secondly, we carried out a number of tests at random using various physical eye examinations and patient's complain to see whether it agree with what it suppose to be.

#### **4.3.1. Performance Benchmark**

The proposed Neural Networks and Decision Tree for Eye Disease Diagnosis (NNDTEDD) architecture relies on a piece of software for easy eye disease diagnosis. The principles un‐ derlying diagnostic software are grounded in classical statistical decision theory. There are two sources that generate inputs to the diagnostic software: disease (H0) and no disease (H1). The goal of the diagnostic software is to classify each diagnostic as disease or no dis‐ ease. Two types of errors can occur in this classification:

**i.** Classification of disease as normal (false negative); and

**ii.** Classification of a normal as disease (false positive).

We define:

Probability of detection *PD* =*Pr* (classify into H1|H1 is true), or

Probability of false negative =1 - *PD*.

Probability of false positive*PF* =*Pr* (classify into H1|H0 is true).

Let the numerical values for the no disease (N) and disease (C) follow exponential distribu‐ tions with parameters *λ<sup>N</sup>* and*λC*, *λ<sup>N</sup>* >*λC*, respectively. Then we can write the probability of detection *PD* and probability of false positive *PF* as

$$P\_D = \int\_{\mathfrak{t}} {\circlearrowright} \lambda\_{\mathbb{C}} {e^{-\{\lambda\_{\mathbb{C}} \cdot x\}}} d\mathfrak{x} = e^{-\lambda\_{\mathbb{C}} \cdot t} \tag{7}$$

**Figure 14.** ROC curves for different r.

**Figure 15.** ROC curves for Cornel Ulcer diagnosis.

The smaller the value of r the steeper the ROC curve and hence the better the performance. The performance analysis of the NNDTEDD algorithms was carried out using MATLAB software package (MATLABR, 2009R) and the results compared with the collected data for

Neural Networks and Decision Trees For Eye Diseases Diagnosis

http://dx.doi.org/10.5772/51380

79

cornel ulcer, uveitis, and glaucoma Figure 15, Figure 16 and Figure 17, respectively.

$$P\_D = \mathfrak{f}\_t^{\circ \circ} \lambda\_N e^{-\left(\lambda\_N \cdot x\right)} dx = e^{-\lambda\_N t} \tag{8}$$

Thus PD can be expressed as a function of PF as

$$\mathbf{P\_D = P\_F^t} \tag{9}$$

Where r = λF/λN is between 0 and 1.

Consequently, the quality profile of most detection software is characterized by a curve that relates its PD and PF, known as the receiver operating curve (ROC) [35]. ROC curve is a func‐ tion that summarizes the possible performances of a detector. It visualizes the trade - off be‐ tween false alarm rates and detection rates, thus facilitating the choice of a decision functions. Following the work done in [36], Figure 14 shows sample ROC curves for various values of r.

**Figure 14.** ROC curves for different r.

**4.3. Performance Analysis of the system**

ease. Two types of errors can occur in this classification:

**i.** Classification of disease as normal (false negative); and **ii.** Classification of a normal as disease (false positive).

Probability of detection *PD* =*Pr* (classify into H1|H1 is true), or

Probability of false positive*PF* =*Pr* (classify into H1|H0 is true).

*PD* =*∫ t ∞λC<sup>e</sup>*

*PD* =*∫ t ∞λ<sup>N</sup> <sup>e</sup>*

detection *PD* and probability of false positive *PF* as

Thus PD can be expressed as a function of PF as

Where r = λF/λN is between 0 and 1.

what it suppose to be.

78 Advances in Expert Systems

We define:

**4.3.1. Performance Benchmark**

Probability of false negative =1 - *PD*.

To justify the performance of our diagnostic system, we conducted two analyses. The first is using a general performance scheme. Secondly, we carried out a number of tests at random using various physical eye examinations and patient's complain to see whether it agree with

The proposed Neural Networks and Decision Tree for Eye Disease Diagnosis (NNDTEDD) architecture relies on a piece of software for easy eye disease diagnosis. The principles un‐ derlying diagnostic software are grounded in classical statistical decision theory. There are two sources that generate inputs to the diagnostic software: disease (H0) and no disease (H1). The goal of the diagnostic software is to classify each diagnostic as disease or no dis‐

Let the numerical values for the no disease (N) and disease (C) follow exponential distribu‐ tions with parameters *λ<sup>N</sup>* and*λC*, *λ<sup>N</sup>* >*λC*, respectively. Then we can write the probability of



PD = PF

Consequently, the quality profile of most detection software is characterized by a curve that relates its PD and PF, known as the receiver operating curve (ROC) [35]. ROC curve is a func‐ tion that summarizes the possible performances of a detector. It visualizes the trade - off be‐ tween false alarm rates and detection rates, thus facilitating the choice of a decision functions. Following the work done in [36], Figure 14 shows sample ROC curves for various values of r.

*dx* =*e*

*dx* =*e*



<sup>r</sup> (9)

The smaller the value of r the steeper the ROC curve and hence the better the performance. The performance analysis of the NNDTEDD algorithms was carried out using MATLAB software package (MATLABR, 2009R) and the results compared with the collected data for cornel ulcer, uveitis, and glaucoma Figure 15, Figure 16 and Figure 17, respectively.

**Figure 15.** ROC curves for Cornel Ulcer diagnosis.

**4.3.2. Performance of the system using Random Tests**

**5. Conclusion**

**6. Recommendations**

In testing the NNDTEDD, fifty different tests from the data sets for testing the system were carried out at random using various eye conditions and physical eye examinations combina‐ tions and the results compared with the expected result of the NNDTEDD. Where there was a match, success was recorded. In situations where there was no match failure were record‐ ed. The total number of success = 46. Total number of failure = 4. Total number of test was 50.

The research presented a framework for diagnosing eye diseases using Neural Networks and Decision Trees. This research extended common approaches of using a neural network or a decision tree alone in diagnosing eye diseases. We developed a hybrid model called Neural Networks Decision Trees Eye Disease Diagnosing System (NNDTEDDS). Neural networks have been successful in the diagnosis of eye diseases according to various symp‐ toms and physical eye conditions. Decision trees have been useful in knowledge extraction from trained neural networks. They have been a means for knowledge discovery. We have obtained rules which explain the diagnosis of eye diseases according to various symptoms and physical eye conditions; these rules explain the knowledge acquired in neural networks by learning from previous samples of symptoms and physical eye conditions. The extracted rules can be used to explained how an eye disease is diagnosed hence removing the opacity in neural network alone. The extracted rules can also be used to train younger ophthalmolo‐ gists. The proposed system was able to achieve a high level of success using the hybrid model of neural networks and decision tree technique. A success rate of 92% was achieved. This infers that combination of neural networks and decision tree technique is an effective

This work is recommended to medical experts (ophthalmologists) as an aid in the decision making process and confirmation of suspected cases. Also, a non expert will still find the work useful in areas where prompt and swift actions are required for the diagnosis of a giv‐ en eye disease covered in the system. Medical practitioners who operate in areas where

there are no specialist (ophthalmologist) can also rely on the system for assistance.

<sup>50</sup> ×100=92 (10)

Neural Networks and Decision Trees For Eye Diseases Diagnosis

http://dx.doi.org/10.5772/51380

81

<sup>50</sup> ×100=8*%* (11)

*Percentage succcess* <sup>=</sup> <sup>46</sup>

*percentage failure* <sup>=</sup> <sup>4</sup>

and efficient method for implementing diagnostic problems.

**Figure 16.** ROC curves for Uveities diagnosis.

**Figure 17.** ROC curves for Glaucoma diagnosis.

#### **4.3.2. Performance of the system using Random Tests**

In testing the NNDTEDD, fifty different tests from the data sets for testing the system were carried out at random using various eye conditions and physical eye examinations combina‐ tions and the results compared with the expected result of the NNDTEDD. Where there was a match, success was recorded. In situations where there was no match failure were record‐ ed. The total number of success = 46. Total number of failure = 4. Total number of test was 50.

$$Percentage\,\,success = \frac{46}{50} \times 100 = 92\tag{10}$$

$$\text{Percentage failure} = \frac{4}{50} \times 100 = 8\% \tag{11}$$

#### **5. Conclusion**

**Figure 16.** ROC curves for Uveities diagnosis.

80 Advances in Expert Systems

**Figure 17.** ROC curves for Glaucoma diagnosis.

The research presented a framework for diagnosing eye diseases using Neural Networks and Decision Trees. This research extended common approaches of using a neural network or a decision tree alone in diagnosing eye diseases. We developed a hybrid model called Neural Networks Decision Trees Eye Disease Diagnosing System (NNDTEDDS). Neural networks have been successful in the diagnosis of eye diseases according to various symp‐ toms and physical eye conditions. Decision trees have been useful in knowledge extraction from trained neural networks. They have been a means for knowledge discovery. We have obtained rules which explain the diagnosis of eye diseases according to various symptoms and physical eye conditions; these rules explain the knowledge acquired in neural networks by learning from previous samples of symptoms and physical eye conditions. The extracted rules can be used to explained how an eye disease is diagnosed hence removing the opacity in neural network alone. The extracted rules can also be used to train younger ophthalmolo‐ gists. The proposed system was able to achieve a high level of success using the hybrid model of neural networks and decision tree technique. A success rate of 92% was achieved. This infers that combination of neural networks and decision tree technique is an effective and efficient method for implementing diagnostic problems.

#### **6. Recommendations**

This work is recommended to medical experts (ophthalmologists) as an aid in the decision making process and confirmation of suspected cases. Also, a non expert will still find the work useful in areas where prompt and swift actions are required for the diagnosis of a giv‐ en eye disease covered in the system. Medical practitioners who operate in areas where there are no specialist (ophthalmologist) can also rely on the system for assistance.
