# Development Of Neuro Fuzzy Based Diagnostic System Computer Science Essay

**Published:** **Last Edited:**

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

## Introduction:

Continuous fetal monitoring has assumed importance in the clinical diagnostic assessment of a fetal well-being [1]. Earlier, it was used in complex or high risk pregnancies only, but now-a-days its use in normal or low risk pregnancies is also common [2]. The goal of antepartum fetal monitoring is to prevent hypoxia related neurological damage and still-births. The previous studies suggest that intrapartum hypoxia has an antepartum origin. The monitoring of the FHR patterns is an established way of fetal surveillance and offers important information about the fetus behaviour. Some conditions such as hypoxia, acidemia and drug induction produce noticeable variations of FHR [3]. Several studies and guidelines on Electronic Fetal Monitoring (EFM) based on analysis of FHR trace have been published during last two decades [4, 5, 6, 7, 8]. The goal of these guidelines is to assess the analytical values of monitoring for evidence based surveillance of the fetus during its intra-uterine life and at the time of delivery. The proper interpretation of FHR trace requires personal experience and significant expertise. It has been seen that this is often lacking in clinical settings, which results in a large number of preventable fetal deaths and unnecessary interventions [9, 10].

There have been significant initiatives to develop expert systems to interpret the FHR patterns based on standard guidelines for fetal heart rate monitoring. A. K. A. Khandaker et al. (1998) described an improved scheme for detecting the presence of the QRS complexes from the enhanced fetal ECG signal obtained by using a fuzzy decision algorithm [12]. M. G. Signorini et al. (2000) proposed new classifiers based on fuzzy inference systems for the FHR signal analysis. They include standard cardiotocographic parameters together with a set of frequency domain and nonlinear indices [13]. O. Fontenla-Romero et al. (2000) presented several approaches to computer supported recognition of accelerative and decelerative patterns in the FHR signal [14]. J. F. Skinner et al. (2000) described the findings of a research project with two main aims: 1) to investigate whether the fuzzy logic could offer an improvement in CTG analysis over the crisp expert system and 2) to investigate whether the retrospective analysis of complete CTG traces could be automated [15]. F. Gurgen et al. (2001) in their study defines an intelligent neuro-fuzzy system for antepartum fetal evaluation [16]. Yo-Ping Huang et al. (2006) proposed a Fuzzy Inference Method based Fetal Distress Monitoring System [17]. T. M. Nazmy et al. (2009) presents an intelligent diagnosis system using a hybrid approach of the adaptive neuro-fuzzy inference system model for classification of Electrocardiogram signals [18].

All these methods are based on either ultrasound Doppler based fetal cardiotocography (fCTG) or fetal electrocardiography (fECG). These techniques require expensive equipments, specialized technicians to operate, experts to interpret the results, high maintenance cost and permanent placement. These requirements can only be met in the advanced level hospitals and are way beyond the rural health-care centers as well as for most of the urban clinics [11]. This research work suggests a method that uses fuzzy logic for diagnosing the fetal well-being and obtains the optimal configuration for fuzzy model. Fuzzy logic is a way of processing data by allowing partial set membership rather than crisp set membership or non-membership, and uses simple rule based if-then to solve the problem rather than attempting to model a system mathematically.

This chapter presents an ANFIS model, which is a powerful hybridized system within Artificial Neural Network (ANN) and fuzzy system, for diagnosing the fetal health status through phonocardiography. The method combined the advantages of fuzzy and ANN techniques which allow using linguistic variables as the inputs of system and suitable dealing with measured data. The FHR trace is obtained from FHS signals as described in the previous chapter. A set of parameters are extracted from each signal and selected ones are serves as input to the intelligent diagnostic system. The output of the proposed system will be classified diagnosis of the fetal health.

The rest of the chapter is organized as:

## Selection of Analytical Parameters:

One of the most important tasks in developing a satisfactory predictive model is the selection of input parameters, which determine the architecture of the model. The National Institute of Child Health and Human Development partnered with the American College of Obstetricians and Gynecologists and the Society for Maternal-Fetal Medicine to sponsor a workshop focused on electronic FHR monitoring [22]. The goal of this workshop was to make recommendation for interpreting specific FHR patterns. A complete clinical understanding of EFM necessitates discussion baseline FHR rate and variability, presence of accelerations, periodic or episodic decelerations, and the changes in these characteristics over time. The guidelines are primarily developed for visual interpretation of FHR patterns, but adaptable to computerized systems of interpretation. Also, the definitions are applicable to intrapartum as well as antepartum observations.

The clinical practice guidelines provide a clear and explicit list and definitions of physiological parameters that can be used for fetal health surveillance during the antenatal part of pregnancy. These parameters can be classified into four categories [5]: baseline, variability, accelerations and decelerations as enumerated below.

Baseline: It is an imaginary line formulated in the absence of accelerations and decelerations and calculated as a mean of the FHR signal rounded to increments of 5 beats per minute (bpm). It is determined over a time period of 5 to 10 minutes and is expressed in bpm. The normal FHR range is between 120 and 160 bpm. The abnormal baseline is termed as bradycardia when the baseline FHR is less than 120 bpm; it is termed as tachycardia when the baseline FHR is greater than 160 bpm.

Variability: It is the fluctuations in the baseline FHR occurring at three to five cycles per minute. The variability is measured by estimating the difference between the highest peak and the lowest trough of the fluctuations in a one-minute segment of the FHR.

Accelerations: Accelerations are transient increments in the FHR above the baseline

by at least 15 bpm and lasting between 15 seconds or more.

Decelerations: Deceleration is defined as the transient episode of slowing down the FHR below the baseline level by more than 15 bpm and lasting 10 seconds or more.

Interpretation of FHR Patterns: The FHR patterns show both dynamic and transient nature and require frequent reassessment. The FHR tracings commonly move from one category (i.e. reassuring, non-reassuring or abnormal) to another over time. The FHR tracing should be interpreted in the context of the overall clinical circumstances, and the categorization of an FHR tracing is limited to the time period being assessed. The recommendations of the clinical guidelines for the above mentioned FHR parameters are summarized in Table 1.

Table 1 Summary of Guidelines for Interpretation of FHR Parameters

## FHR Parameters

## Baseline (bpm)

## Variability (bpm)

## Deceleration

## Acceleration

## Reassuring

110-160

â‰¥5 and â‰¤25

0 or 1

â‰¥1

## Non-reassuring

100-109 or

161-180

>2 and <5

or

>25 and <50

>1

0 or 1

## Abnormal

< 100, or

> 180

<2 or >50

>1

0 or 1

The fetal health status can be classified on the basis of the parameters obtained from the pattern of the FHR trace as follows:

Normal: A FHR trace in which all four FHR parameters fall into the reassuring category.

Suspicious: A FHR trace in which any one of the FHR parameters falls into the non-reassuring category and the remainder of the parameters are normal.

Pathological: A FHR trace in which more than one FHR parameters fall into the non-reassuring category or one or more FHR parameters are in the abnormal category.

This classification may help the clinicians to understand and communicate the issues relating to the fetal well-being in an objective manner.

## Fuzzy Logic Systems:

The theory of Fuzzy Logic was first raised by the mathematician Lotfi A. Zadeh in 1965. This theory is a result of the insufficiency of Boolean Algebra to many problems of the real world. Fuzzy systems are knowledge based or rule based systems. The heart of a fuzzy system is a knowledge base consisting of the so called fuzzy IF-THEN rules. A fuzzy IF-THEN rule is an IF-THEN statement in which some words are characterized by continuous membership functions.

Advantages of Fuzzy Logic: Fuzzy systems are gradually replacing linear systems because of some inherent advantages such as [Jang and Sun, 1997]:

It is conceptually easy to understand.

Fuzzy logic is flexible.

It is tolerant of imprecise data.

It can model nonlinear functions of arbitrary complexity.

It can be built on top of the experience of experts.

It can be blended with conventional control techniques.

Fuzzy logic is based on natural language.

Disadvantages of Fuzzy Logic:

## Fuzzy Sets:

In the classical set theory a set can be represented by enumerating all its elements using

If these elements ai (i = 1,.....,n) of A are together a subset of the universal base set X, the set A can be represented for all elements xâˆˆ X by its characteristic function

In classical set theory there are only two values of truth, which has values 0 (false) and 1 (true) and are called as crisp sets. Non-crisp sets are called fuzzy sets, for which a membership function as shown in equation (5.3) can be defined. The membership of a fuzzy set is described by this membership function of A which associates to each element x0 = X a grade of membership. The membership function of a fuzzy set have normalized closed interval [0 1]. Therefore, each membership function maps elements of a given universal base set X which is itself a crisp set, into real numbers in [0,1]. The notation for the membership function, of a fuzzy set A is shown in equation (5.3) below.

Each fuzzy set is completely and uniquely defined by one particular membership function. Consequently symbols of membership functions are also used as labels of the associated fuzzy sets, such as big, small and others. Figure * shows the differences in the crisp and fuzzy sets.

## 5.3.2 Membership Function:

The membership function describes the membership of the elements x of the base set X in the fuzzy set A, whereby for a large class of functions can be taken. Reasonable functions often used are linear functions, such as triangular or trapezoidal functions. The grade of membership of a membership function describes which grade it belongs to in the fuzzy set A. This value is in the unit interval [0,1]. This is shown in Figure *.

## 5.3.3 Components of a Fuzzy System:

There are basically four components in the fuzzy logic system which is fuzzification, inference engine, rule base and defuzzification. In some cases, a fuzzy system is drawn as a black box with some inputs and an output. Figure * shows the general structure of the fuzzy inference system.

Fig. 1: The General Structure of Fuzzy Inference System

Fuzzification is used to convert each piece of input data to degrees of membership by a lookup in one or several membership functions. The fuzzification block thus matches the input data with the conditions of the rules to determine how well the condition of each rule matches that particular input instance. There is a degree of membership for each linguistic term that applies to that input variable.

A fuzzy rule base consists of a set of fuzzy IF-THEN rules. It is the heart of the fuzzy system in the sense that all other components are used to implement these rules in a reasonable and efficient manner. Inference engine simply implies the combination of certain rules into a mapping from a fuzzy rule base to get some output corresponding to the inferred rules. There are two ways to infer with a set of rules which are composition based inference and individual rule based inference. In composition based inference, all rules in the fuzzy rule base is combined into a single fuzzy relation which is then viewed as a single fuzzy IF-THEN rule. Most common type of inference used is shown below:-

The fuzzy intersection operator ï€ (fuzzy AND connective) applied to two fuzzy sets A and B with the membership functions and is

## ,

The fuzzy union operator ï€ (fuzzy OR connective) applied to two fuzzy sets A and B with the membership functions and is

## ,

The fuzzy complement operator (fuzzy NOT operation) applied to the fuzzy sets A with the membership functions is

In individual rule base inference, each rule in the fuzzy rule base determines an output fuzzy set and the output of the whole fuzzy inference engine is the combination of many individual fuzzy sets. The combination can be taken either by union or by intersection. In general, there are three criteria of choosing the inference methods which are intuitive appeal, computational efficiency and special properties. The value inferred by the fuzzy rule base is in the fuzzy value or in other words, for every possible value Î¼, one gets a grade of membership that describes to what extent this value Î¼ is reasonable to use. Defuzzification is used to transform fuzzy information into a single value. The most common methods of defuzzification are centre of gravity (COG), centre of singleton (COS), maximum membership, weight average and mean-max membership.

## Neuro-Fuzzy Model:

The fuzzy set theory plays an important role in dealing with uncertainty when making decisions in medical applications. Therefore, fuzzy sets have attracted the growing attention and interest in modern information technology, production technique, decision making, pattern recognition, diagnostics, data analysis, etc. (Dubois and Prade, 1998-[24]; Kuncheva and Steimann, 1999-[25]; Nauck and Kruse, 1999-[26]). Neuro-fuzzy systems are fuzzy systems, which use ANNs theory in order to determine their properties (fuzzy sets and fuzzy rules) by processing data samples. Neuro-fuzzy systems harness the power of the two paradigms: fuzzy logic and ANNs, by utilizing the mathematical properties of ANNs in tuning rule-based fuzzy systems that approximate the way humans' process information. A specific approach in neuro-fuzzy development is the adaptive neuro-fuzzy inference system (ANFIS), which has shown significant results in modeling nonlinear functions. In ANFIS, the membership function parameters are extracted from a data set that describes the system behaviour. The ANFIS learns features in the data set and adjusts the system parameters according to a given error criterion (Jang, 1992-[27]).

## 5.5 Adaptive Neuro-Fuzzy Inference System (ANFIS):

A neuro-fuzzy (ANFIS) system is a combination of neural network and fuzzy systems in such a way that neural network is used to determine the parameters of fuzzy system. ANFIS largely removes the requirement for manual optimization of the fuzzy system parameters. A neural network is used to automatically tune the system parameters, for example the membership functions bounds, leading to improved performance without operator invention. The neuro-fuzzy system with the learning capability of neural network and with the advantages of the rule-base fuzzy system can improve the performance significantly and can provide a mechanism to incorporate past observations into the classification process. In neural network the training essentially builds the system. However, using a neuro-fuzzy scheme, the system is built by fuzzy logic definitions and is then refined using neural network training algorithms. Some advantages of ANFIS are:

Refines fuzzy if-then rules to describe the behaviour of a complex system.

Does not require prior human expertise

uses membership functions and

desired dataset to approximate

Greater choice of membership functions to use.

Very fast convergence time.

## 5.4 ANFIS Architecture:

The ANFIS combines the interpretability of the fuzzy system with the adaptive learning ability of the neural network. The use of the neural network training techniques allows embedding empirical information into a fuzzy system [19].

This present investigation considers the ANFIS structure with the zero-order Sugeno model containing 80 rules. The Gaussian membership functions with product inference rule are used at the fuzzification level. The fuzzifier outputs the firing strength for each rule. The vector of firing strengths is normalized. The resulting vector is defuzzified by utilizing the zero-order Sugeno model. The exact procedure is explained in the following steps.

Assume that the fuzzy inference system has two inputs x1 and x2, and one output y. This system makes use of a hybrid learning rule to optimize the fuzzy system parameters of a first-order Sugeno system. ANFIS implements the rules of the form:

Rule 1: if (x1 is A1) and (x2 is B1) then (f1=p1x1+q1x2+r1)

Rule 2: if (x1 is A2) and (x2 is B2) then (f2=p2x2+q2x2+r2)

where x1 and x2 are the predefined membership functions, Ai and Bi are membership values, pi, qi, and ri are the consequence parameters. For a zero-order Sugeno model, the output level is a constant (i.e., pi = qi = 0). Figure * illustrates the reasoning mechanism for this Sugeno model where it is the basis of the ANFIS model.

The five-layered architecture of an ANFIS with features of two inputs, two rules, and the first-order Sugeno model, is shown in Figure 2. The circle indicates a fixed node whereas a square indicates an adaptive node whose parameters are changed during training. For the training of the network, each epoch is composed of a forward-pass and a backward-pass. The forward-pass propagates the input vector through the network layer by layer. In the backward-pass, the error is sent back through the network [20].

Fig 2 An ANFIS Architecture for a Two-rule Sugeno System

The computational details of ANFIS at each layer can be explained as follows:

Layer 1: Each node in this layer generates membership grades of the crisp inputs which belong to each of the convenient fuzzy sets by using the membership functions. The output of each node is:

Where and are the appropriate membership functions for Ai and Bi fuzzy sets respectively. The commonly used membership functions are trapezoidal, triangular, Gaussian, generalized bell function, etc., which can be applied to determine the membership grades. The parameters in this layer are referred to as premise parameters. The symmetric Gaussian function depends on two parameters Ïƒ and c as given by:

Layer 2: In this layer the AND/OR operator is applied to get one output that represents the results of the antecedent for a fuzzy rule, which is "firing strength". It means the degrees by which the antecedent part of the rule is satisfied and it indicates the shape of the output function for that rule. The outputs of the second layer, called as firing strengths (w), are the products of the corresponding degrees obtained from the layer 1.

Layer 3: This layer contains the fixed nodes which compute the ratio of firing strength of each ith rule to the sum of firing strength of all the rules.

Layer 4: The nodes in this layer are adaptive and determine the consequent parameters using the least means squares algorithm:

Where is the output of the ith node from the previous layer. {pi, qi, ri}is the parameter set in the consequence function and also represent the coefficients of the linear combination in Sugeno inference system. The parameters in this layer are referred to as the "consequent parameters".

Layer 5: This layer is called as the output node which computes the overall output by summing all the incoming signals. In this layer the fuzzy results of each rule are transformed into a crisp output by defuzzification process:

Learning Algorithm: The task of the learning algorithm for this architecture is to tune all the modifiable parameters, namely {ai, bi, ci} and {pi, qi, ri}, to make the ANFIS output match the training data. When the premise parameters ai, bi and ci of the membership function are fixed, the output of the ANFIS model can be written as:

Substituting equation (5.11) in (5.14) gives:

Substituting the fuzzy if-then rules into Eq. (5.15), it becomes:

which is a linear combination of the modifiable consequent parameters p1, q1, r1, p2, q2 and r2. The least squares method can be used to identify the optimal values of these parameters easily. When the premise parameters are not fixed, the search space becomes larger and the convergence of the training becomes slower. A hybrid algorithm combining the least squares method and the gradient descent method is adopted to solve this problem. The hybrid algorithm is composed of a forward and a backward pass. The least squares method (forward pass) is used to optimize the consequent parameters with the premise parameters fixed. Once the optimal consequent parameters are found, the backward pass starts immediately. The gradient descent method (backward pass) is used to adjust optimally the premise parameters corresponding to the fuzzy sets in the input domain. The output of the ANFIS is calculated by employing the consequent parameters found in the forward pass. The output error is used to adapt the premise parameters by means of a standard backpropagation algorithm.

## ANFIS Classifier:

In this section, the Fuzzy Logic Toolbox of MatlabTM R2009a version 7.8.0 is utilized to develop the ANFIS architecture for classification of fetal health status. This toolbox provides the needed tools to create and edit fuzzy inference systems within the framework of Matlab. It also provides the graphical user interface (GUI) tools to facilitate work, besides the command line functions [30]. The proposed fuzzy model is shown in Figure 5.

Fig. 5 ANFIS Model for Antenatal Care

The first step in the construction of the fuzzy inference system is to determine its structure, i.e. to obtain the number of input, number of membership functions for each input and the rules. In this work, four numbers of the input parameters are used, namely: Baseline, Variability, Acceleration and Deceleration. Only one output is used to classify the health status of the fetus as Normal, Suspicious or Pathological. The ANFIS structure with zero-order Sugeno model (i.e. constant output layer) is considered. This model is regarded as a special case of Mamdani system, where the consequent of each rule is specified by a fuzzy singleton (a fuzzy set that has nonzero membership value for only one element of the universe of discourse), this may improve the interpretability of the model. The Gaussian membership functions with product inference rule are used to define the degree of membership of the input variables. The hybrid learning algorithm that combines the least square and the gradient descent method is used to adjust the parameters of the membership functions. The details of the input and the output fuzzy sets, the number of membership functions in each input and their ranges are depicted in Table 2.

Table 2 Details of Input and Output Fuzzy Sets

## Fuzzy Set (Range)

## Type

## Membership Function (Range)

Baseline (50-250) BPM

Input

Verylow (50-100) BPM

Low (100-110)

Normal (110-160) BPM

High (160-180)

Veryhigh (180-250) BPM

Variability (0-50) BPM

Input

Verylow(0-2) BPM

Low (2-5) BPM

Normal (5-25) BPM

High (25-50)

Acceleration (0-10)

Input

Present (1-10)

Absent (0-1)

Deceleration (0-10)

Input

Present (1-10)

Absent (0-1)

Diagnosis

Output

Normal (1)

Suspicious (2)

Pathological (3)

The ANFIS structure with zero-order Sugeno model containing 80 rules is shown in Figure 6.

Fig 6 ANFIS Structure

## Development of Neuro-Fuzzy Inference System

The medical diagnosis of the unborn is an important but complicated task that should be performed accurately and efficiently and its automation would be very useful in practical application. The main objective of the proposed system is to automatically analyze the fPCG signals and to assess the health status of the fetus. Unfortunately, because of limited resources, sufficient quantities of FHS recordings were not available. To address this problem, again the Signal Simulation Module (SSM) for the simulation of maternal abdominal signals has been used [31]. These records of the simulated signals are used for the development and experimental analysis of the ANFIS model.

A set of 800 data analogous to various normal and pathological conditions were generated using the SSM under the supervision of an expert gynecologist. This dataset was used for system training and generation of the initial fuzzy inference system. As mentioned earlier the Gaussian membership functions were selected to express the input variables. There are four inputs with 5, 4, 2 and 2 number of membership functions; hence the number of rules is 5Ã-4Ã-2Ã-2=80. The output membership function used here is a constant type. The ANFIS learns features in the dataset and adjusts the system parameters according to a given error criterion. The parameters used for ANFIS training are: number of nodes = 193, number of linear parameters = 80, number of nonlinear parameters = 26, number of training data pairs = 800 and number of fuzzy rules = 80. Figure 7 and 8 show the initial and final membership functions of all the four inputs respectively. The model achieved a minimum training error of 0.00016628 in 961 epochs. The inspection of initial and final membership functions indicates that there are significant changes in the final membership functions of the ANFIS after completion of training.

Fig 7 Initial Memebership Functions of Four Inputs

Fig 8 Final Membership Functions of Four Inputs

Experimental Testing of Diagnostic System

5.6 Conclusion