# Automatic Classification of Fatty Liver Disease Based on Supervised Learning and Genetic Algorithm
## 3 Materials and Methods
### Methodology
#### 3.2.2 Classification  
For all selected \"ROIs,\" there were 26 decisions made. This process was repeated for all other ROIs. The number of decisions made for the normal tissue were counted accordingly. Then, this count was compared to a specific threshold, i.e., the voting threshold, as a consequence of the number of ROIs categorized as fatty liver to the number of ROIs categorized as normal liver, a voting-based classifier was used to identify the class of the liver type. The final vote was \"normal liver\" if the count was greater than the threshold for voting. Otherwise \"fatty liver\" as the final decision, as shown below in Algorithm 1. Furthermore, to diagnose diffuse liver disease in an accurate manner, dynamic-sized ROIs (row \(\times\) column) were proposed. In this study, to prevent manually selected threshold parameters; the GA was used. Figure 4 shows the general process and the training and the testing phases of the dataset for optimizing a grey ROI selection by using the GA. In the training phase stage, each image of the normal/fatty liver in the training set was employed for the planned work. Then, the thresholds and parameters were automatically selected and optimized by GA, such that this image was identified as a normal or fatty item, respectively. In the testing part, a whole image of the testing set was utilized in the suggested work. Then, according to the voting function, liver tissue was classified as normal/fatty liver. Figure 3: General block diagram of the work proposed. ```
1. For iteration number = 1, 2, 3,......, number of iteration do
2. For every chromosome do

Number of incorrectly classified images = 0

For every training image do

voting = 0

For every ROI of size, \(m\) x n do

Convert ROI into gray level using the equation:

\(I=0.2989*\ R+0.5870\ *\ G+0.1140\ *\ B\)

Compute all 26 features

End for

If voting > voting_threshold

If training image = abnormal

Number of incorrectly classified image

End if

Else

If training image = normal

Number of incorrectly classified image +1\(\rightarrow\)

End if

End for

Assign fitness score to the chromosome

End for

3. For every testing image do

voting = 0

For every ROI do

Convert ROI into gray level

Compute all 26 features

4. If voting > voting_threshold

Liver case = normal

Else

Liver case = Abnormal

End if

End for

## 4 Results

This study developed a Computer-Aided Diagnosis technique using the Genetic Algorithm and machine learning algorithms (supervised learning), for the classification of liver skins as being fatty or natural, based on obtaining ultrasound image features and a voting-based classifier, based on a combination of 26 features. ### Genetic Algorithm

In this study, 300 images were collected from 300 patients of 155 normal and 145 fatty cases. Every acquired image was processed as presented in Figure 5a; then, it was converted to a grey level image (by using Equation (1)), as shown in Figure 5b. As a consequence, a number of ROIs were carefully chosen within the liver tissue from the training set, as shown in Figure 5c. These suggested regions covered the tissue of the liver, as indicated by the specialized physician and experts. Figure 4: Elevating parameters using a GA and overall process, note: #\(\rightarrow\)Number. The collected data set was categorized into testing and training sets. The training images included 110 fatty images and 120 normal images. Whereas, the testing images involved 35 fatty images and 35 natural images. The generation increased as \"false negatives\" or the number of wrongly classified US images decreased in the following figure \"Best: 2\" meant that only two images in the training set were mistakenly categorized, as presented in Figure 6.

Table 3 exhibits the number of US images that were classified correctly or incorrectly. It also presents the evaluated classification percentages in the case of the training and testing images. ### Performance Evaluation Metrics

In our case, the number of testing images was 70 (35 + 35) for the two groups (fatty and natural).