# A New Feature Selection Method Based on Hybrid Approach for Colorectal Cancer Histology Classification

Authors: Mohanad A. Deif; Hani Attar; Ayman Amer; Haitham Issa; Mohammad R. Khosravi; Ahmed A. A. Solyman
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

Colorectal cancer (CRC) is one of the most common malignant cancers worldwide. To reduce cancer mortality, early diagnosis and treatment are essential in leading to a greater improvement and survival length of patients. In this paper, a hybrid feature selection technique (RF-GWO) based on random forest (RF) algorithm and gray wolf optimization (GWO) was proposed for handling high dimensional and redundant datasets for early diagnosis of colorectal cancer (CRC). Feature selection aims to properly select the minimal most relevant subset of features out of a vast amount of complex noisy data to reach high classification accuracy. Gray wolf optimization (GWO) and random forest (RF) algorithm were utilized to find the most suitable features in the histological images of the human colorectal cancer dataset. Then, based on the best-selected features, the artificial neural networks (ANNs) classifier was applied to classify multiclass texture analysis in colorectal cancer. A comparison between the GWO and another optimizer technique particle swarm optimization (PSO) was also conducted to determine which technique is the most successful in the enhancement of the RF algorithm. Furthermore, it is crucial to select an optimizer technique having the capability of removing redundant features and attaining the optimal feature subset and therefore achieving high CRC classification performance in terms of accuracy, precision, and sensitivity rates. The Heidelberg University Medical Center Pathology archive was used for performance check of the proposed method which was found to outperform benchmark approaches. The results revealed that the proposed feature selection method (GWO-RF) has outperformed the other state of art methods where it achieved overall accuracy, precision, and sensitivity rates of 98.74%, 98.88%, and 98.63%, respectively.


---

## Body

## 1. Introduction

Among the types of gastrointestinal cancers, colorectal cancer (CRC) is the third most common cancer representing globally 13% of all malignant tumors [1], and it is the fourth most popular reason for cancer-related death with 700,000 deaths per year [2, 3]. To reduce cancer mortality, early diagnosis and therefore early treatment is essential in leading to a greater improvement and survival length of patients. Treatment of CRC is strongly dependent on the stage of the disease at the time of diagnosis. To evaluate patients, many imaging methods as computed tomography (CT) [4, 5], magnetic resonance imaging (MRI) [6], and microscopy [7] have been employed to provide information about the structure and type of tumor. Currently, analytic computation of slide images formed from digital pathology slides was reported [8, 9], where extracted texture features are relevant to important applications for computational image analysis for effective classification and diagnosis.In medical imaging, the classification of different tissue types based on texture analysis was presented by many reports [10, 11]; typically, these methods first extract texture features [12–14] and then introduce the features into a classifier to identify tissue types [15–17]. Histological images may contain more than two tissue types, but most published methods for classifying tissue types on CRC histological images have two categories of the tissue type which are as tumor and Stroma [18–19, 20]. In recent years, machine learning classification has been one of the most successful computational tools in disease investigation and early detection. This includes analyzing a large number of datasets containing a large number of features. Moreover, many noisy, redundant, and unessential features in data sets must be reduced to improve classification accuracy and processing speed. Feature selection optimization was proposed to solve this problem where it is employed to properly select the minimal most relevant subset of features out of a vast amount of complex noisy data. Generally, wrappers and filter methods are the two most common types of feature selection methods [21, 22]. A standard feature selection approach follows a four-step process [21, 23]: (1) candidate subset generation, (2) subset evaluation, (3) picking the criterion for stopping, (4) the subset validation check. As reported from previous studies [21], the quality of the feature selection on the classification algorithm is addressed by wrapper methods and showed superior classification performance than filter methods.This article proposes a new approach for choosing wrapper features to determine the best subset of features for classifying texture analysis in multiple classes of colon cancer histology. This approach is divided into two phases: feature selection and classification. Gray wolf optimization (GWO) is used in the first place to find the best features of the disease detection dataset by optimizing the hyperparameters of the RF algorithm. In the second stage, an artificial neural network (ANN) is used to classify multiclass texture analysis for colorectal cancer. The proposed method is compared with other competitor’s feature selection methods to determine the most efficient method in terms of CRC classification accuracy, sensitivity, and specificity. The comparison aims to evaluate the efficiency of the proposed method in handling high dimensional and redundant data for early diagnosis of CRC and to reach a high classification accuracy with the minimal possible size of a subset of features.To improve the efficiency and accuracy of performance, CRC has proposed many methods for classifying different tissue types. Wu et al. [24] used color channel histograms, GLCM, and structural features to classify four types of colon tissue (mild, cancerous, adenomatous, and inflammatory) with an accuracy of 75.15 μ. Liu et al. [25] examined an automated colon color recognition system that uses GLCM for texture extraction and a support vector machine (SVM) for classification. The accuracy of this approach in distinguishing between cancerous and noncancerous images was 96.67%. Liu et al. [26] used a 2D discrete wavelet (DW) transform function to accurately identify slide-wide colon cancer images of normally cancerous and adenomatous polyp cases, with 91.11% achieved overall accuracy. To test CRC heterogeneity [27], complete tumor texture features are calculated with Laplace or Gaussian filters (LoG). In addition, as per Rao et al. [28], we examined the texture characteristics of LoG to see if we could tell the difference between CRC patients with liver metastases and CRC patients without metastases. Other studies using local descriptors have been proposed, along with approaches that rely on scale-invariant feature transformations (SIFT) [29], shape contexts [30], and histograms of orientation gradient (HOG) descriptors [31]. increase. Liao et al. [30] used a deep convolutional neural network (CNN) to improve traditional classification methods. The author considered a transition in the learning approach to learn a better predictive model and eventually achieved 95% accuracy.All of the previous studies mentioned above applied different image processing methods and different classifier algorithms to enhance classification accuracy. However, they did not focus on the relation between the number of features and classification accuracy. Hence, a selection method to measure the usefulness of a subset of features by actually training the classifier on it was developed. Therefore, in this study, a new feature selection technique was investigated to improve the accuracy of traditional machine learning approaches.


### 1.1. Datasets

This work used a dataset of 5,000 human colon cancer histology, including eight types of tissue. This dataset is from the Pathology Archive of the University of Mannheim Medical Center [18]. Different types of tissues were illustrated in Figure 1 and tabulated in Table 1.Figure 1
Histopathological images for different categories of tissue.Table 1
Description of the different categories of datasets used in the experiments.
CategoriesDescriptionCategory labelTumor epitheliumTypes of tumors that develop from epithelial cells0Simple stromaThe tumor arises in the supporting connective tissue of an organ.1Complex stromaContains single tumor cells and/or few immune cells2Immune cellsIncludes immune-cell conglomerates and submucosal lymphoid follicles3DebrisIncludes necrosis, hemorrhage, and mucus4Normal mucosal glandsNormal tissues found in mucosal glands5Adipose tissueIs a loose connective tissue composed mostly of adipocytes6BackgroundNo tissue7


## 1.1. Datasets

This work used a dataset of 5,000 human colon cancer histology, including eight types of tissue. This dataset is from the Pathology Archive of the University of Mannheim Medical Center [18]. Different types of tissues were illustrated in Figure 1 and tabulated in Table 1.Figure 1
Histopathological images for different categories of tissue.Table 1
Description of the different categories of datasets used in the experiments.
CategoriesDescriptionCategory labelTumor epitheliumTypes of tumors that develop from epithelial cells0Simple stromaThe tumor arises in the supporting connective tissue of an organ.1Complex stromaContains single tumor cells and/or few immune cells2Immune cellsIncludes immune-cell conglomerates and submucosal lymphoid follicles3DebrisIncludes necrosis, hemorrhage, and mucus4Normal mucosal glandsNormal tissues found in mucosal glands5Adipose tissueIs a loose connective tissue composed mostly of adipocytes6BackgroundNo tissue7


## 2. Methodology

### 2.1. Preliminaries

(1)
Random forests algorithm reviewRandom forests developed by Breiman, 2001 [32], are a collection of classification and regression decision trees (CART) [32, 33] that are trained on datasets of the same size called bootstraps, created from a random resampling on the training set itself. In Breiman’s study, each tree in the collection is formed firstly by selecting k features randomly at each node, and secondly, by calculating the Gini index to determine the best split based on these features in the training set. The decision will be taken by aggregating the predictions of all the decision trees by majority voting. A small value of the Gini index indicates a better classification result. Gini(v), which is node v Gini index, is expressed as follows:
(1)Giniv=∑C=1Cp^CV1−p^CV,wherep^CV denotes the percentage of class-c observations at node v. Gain (Xi, v), which is the Gini information gain of Xi for splitting node v, is the variance among the impurity at the node v and the sample mean of imperfection at each node of v. Gain (Xi, v) is calculated from:
(2)GainXi,v=GiniXi,v−wLGiniXi,vL−wRGiniXi,vR,wherevR and vL are, correspondingly, the right and left nodes of v and wR, and wL is the quantities of occurrences allocated to the right and left child nodes, respectively. A random collection of mtry features from P (predictive features) is evaluated at each node, and the function with the highest Gain (Xi, mtry) is used to split the node v. Variable Xi importance score can be calculated as
(3)Impi=1ntree∑mtry∈SXiGainXi,mtry,whereSXi denotes the set of nodes divided by Xi in the RF using ntree. The RF importance scores are widely used to test the function contributions to class prediction. The number of trees (ntrees) used for each forest and the number of characteristics used at each split are the two most important parameters that determine random forest efficiency (mtry).Error rates can be evaluated in two ways. One way to do this is to split the dataset into two parts: training and testing. Forests can be created from the training phase, and error rates can be calculated from test parts. OutofBag (OOB) error estimation is another option. Because the random forests algorithm calculates the OOB error during the training phase, we do not need to partition the training data to retrieve the OOB error. The “OOB error” can be determined as follows:(4)OOBerror=∑inTreeOOBerrorinTree.(2)
Gray wolf optimization algorithm reviewBased on the previous study proposed by Lowe [34], the gray wolf optimization (GWO) algorithm is discussed in the following subsections.


#### 2.1.1. GWO Inspiration

GWO resembles the hunting behavior of gray wolf packs which is established using three basic steps: (1) inclosing, (2) hunting, and (3) attacking. Gray wolves have a social hierarchy that classifies the domination and authority of wolves. The leading and dominating wolf in the gray wolf hierarchy is the alpha wolf which is responsible for decision making, hunting, and other pack activities. Beta wolf follows next in the hierarchy which represents the second and powerful wolf and will assist the alpha in decision making. Omega and delta are less effective, and they have the lowest ranking [33].


#### 2.1.2. Mathematical Model of GWO

The GWO mathematical model is mainly comprised of three basic steps: inclosing, hunting, and attacking which are represented in the following equations [34, 35].
(i)
Encircling the preyIn the GWO mathematical model, the inclosing behavior is represented in the following equations:(5)X⟶t+1=Xp⟶t+A⟶.D⟶,whereD⟶ is defined in equation (5), t is the iteration number, A⟶, C⟶are coefficient vectors, Xp⟶ is the prey position, and X⟶ is the gray wolf position.The calculation for the vectorsA⟶, C⟶ is presented in the next equations:
(6)D⟶=C⟶.Xp⟶t−X⟶t,(7)A⟶=2A⟶.r1⟶−a⟶,(8)C⟶=2r2⟶,where components ofa⟶ are linearly decreased from 2 to 0 throughout iterations, and r1 and r2 are random vectors in [0, 1].
(ii)
Hunting the preyIn the hunting phase, gray wolves are leaded by alpha. The beta and delta could also help in hunting. To mathematically simulate the hunting behavior of gray wolves, it was assumed that the alpha (α) (fittest candidate solution), beta (β), and delta (δ) had better knowledge of the prey’s possible position. The first three best solutions guide the ω wolf to change its location in the decision space based on the position of the best search agents. Representing hunting mathematically can take the following equations:
(9)Dα⟶=C1⟶.Xα⟶−X⟶,Dβ⟶=C2⟶.Xβ⟶−X⟶,Dδ⟶=C3⟶.Xδ⟶−X⟶,(10)X1⟶=Xα⟶−A1⟶.Dα⟶,X2⟶=Xβ⟶−A2⟶.Dβ⟶,Xδ⟶=Xδ⟶−A3⟶.Dδ⟶,(11)X⟶t+1=X1⟶+X2⟶+X3⟶3.(iii)
Attacking the preyThe attacking of the prey is dependent on the vectora⟶where its value is linearly updated in each iteration to range 2 to 0 according to the following equation
(12)a⟶=2−t.2Maxiter,where t is the iteration number, andMaxiter is the total number of iterations allowed for the optimization.
(3)
Particle swarm optimization (PSO)PSO was initially developed by Kennedy and Eberhart in 1995 [36]. Due to its optimization accuracy, many researches were conducted on PSO to solve a variety of engineering optimization problems. PSO is a heuristic global optimization method as well as a swarm intelligence-based optimization algorithm. The concept of PSO emerges from the behavior of swarm particles and the social interaction between particles. When looking for food, the birds either disperse or move together to find it. The birds move from one location to another in search of food, and the bird closest to the food can smell it. PSO’s basic algorithm is made up of n swarm particles, and the position of each particle represents a potential solution. According to the three principles, the swarm particle changes its position.
(1)
Keep its inertia(2)
Update the condition relating to its optimal position


### 2.2. Update the Condition to the Swarm’s Most Optimal Position

#### 2.2.1. Feature Extraction

Before computing the texture features, all red/green/blue (RGB) images were converted to grayscale and depicted as the overall intensity distribution per class, as shown in Figure2, to evaluate the difference between samples in each group.Figure 2
Overall intensity distribution per class.It was clear from Figure2 that the intensity values of all histological images of the applied dataset are very various. The distributions of categories (tumor, stroma, complex, and lymph) are convergent and contradictory to categories (debris, mucosa, adipose, and empty). Moreover, images of adipose and empty are of very high intensity, and the intensity distributions are very similar which makes it difficult to distinguish. We should find out their meanings as adipose may be very tough to distinguish from empty. And does empty mean, no image at all. To get a clearer understanding of the extent of overlaps, densities were plotted against intensities for each attribute in Figure 3, the categories that demonstrated significant overlaps with one another are (tumor and immune cells), (mucosal glands and simple stroma), and (complex stroma and muscol glands).Figure 3
Overlaps between different categories of tissue (x and y-axis denote the density and intensity, respectively).Comparing tumors to immune cells in Figure3, it can be observed that overlap is seen around the value of 75 (both high in density), and the total range of overlap extends from around 70 to 80. Therefore, if pixel values alone were used to generate classifiers, these two classes would have the highest chance to get mixed up with one another. Beyond that, they have similar shapes of density, similar mean, and standard deviation, which makes it difficult to differentiate by the first moments. To differentiate them, a look at their potential differences at higher moments might be taken, or RGB data might be pursued and color information might be used. As for mucosal glands compared to other stromas, MG’s extremely large values overlap a little with simple stroma’s extremely small values, and the opposite happens for MG vs. complex.The variation of image intensity distributions between classes inspired us to perform feature extraction based on the gray-level cooccurrence matrix (GLCM). The GLCM is a highly effective tool for extracting image features that map the probabilities of gray level cooccurrence based on pixel spatial relationships in various angular directions. We used four directions (0°, 45°, 90°, and 135°) and five displacement vectors (from 1px to 5px). To make this texture descriptor invariant concerning rotation, we averaged the GLCMs obtained from all four directions for each displacement vector.GLCM usage can lead to extract features such as information measure of correlation1, autocorrelation, entropy, dissimilarity, correlation, cluster prominence, contrast, cluster shade, energy, homogeneity, maximum probability, sum of squares variance, sum variance, sum average, sum entropy, difference variance, difference entropy, information measure of correlation 2, inverse difference normalized (INN), inverse difference homogenous (INV), and inverse difference moment normalized.


### 2.3. The Proposed Algorithm

The hybrid algorithm was proposed based on GWO optimizer and RF (GWO -RF) to ensure recognition of multiclass texture analysis in colorectal cancer with better accuracy. The proposed algorithm takes the input of a set of features and returns the reduced subset of features and therefore upgrading the performance of the classifier model. The proposed algorithm process was summarized in Figure4 and described in the following steps:
(1)
Load the dataset(2)
Initialize the position of (α, β, and δ) with zero(3)
Initialize the variable score (α, β, and δ) with zero(4)
Randomly initialize the population of the wolves’ store(5)
Calculate the fitness function (f) using equation (13)(6)
Find the sigmoid ofX using equation (6)(7)
Update the positions of the agents(8)
Use the alpha pos for feature selection(9)
Apply the artificial neural networks (ANNs) classifier on the selected featuresFigure 4
Flowchart of hybrid proposed algorithm (GWO-RF).The fitness functionfis calculated using the following equation:
(13)f=PIM+Wf×1−NSNt.The permutation importance measure (PIM) for the permuted featureXj was computed using the following equation:
(14)PIMkXj=1ntree∑terrOOBtj−errOOBt,whereXj is the permutated feature. errOOBtj is the perturbed sample. errOOBt is the error of a single tree t on this OOB sample. Wf is the weight factor, creates a balance between the feature importance, PIM, and the number of selected features. The value of Wf is 0.7. NS is the number of selected features. Nt is the total number of features present in the dataset.


## 2.1. Preliminaries

(1)
Random forests algorithm reviewRandom forests developed by Breiman, 2001 [32], are a collection of classification and regression decision trees (CART) [32, 33] that are trained on datasets of the same size called bootstraps, created from a random resampling on the training set itself. In Breiman’s study, each tree in the collection is formed firstly by selecting k features randomly at each node, and secondly, by calculating the Gini index to determine the best split based on these features in the training set. The decision will be taken by aggregating the predictions of all the decision trees by majority voting. A small value of the Gini index indicates a better classification result. Gini(v), which is node v Gini index, is expressed as follows:
(1)Giniv=∑C=1Cp^CV1−p^CV,wherep^CV denotes the percentage of class-c observations at node v. Gain (Xi, v), which is the Gini information gain of Xi for splitting node v, is the variance among the impurity at the node v and the sample mean of imperfection at each node of v. Gain (Xi, v) is calculated from:
(2)GainXi,v=GiniXi,v−wLGiniXi,vL−wRGiniXi,vR,wherevR and vL are, correspondingly, the right and left nodes of v and wR, and wL is the quantities of occurrences allocated to the right and left child nodes, respectively. A random collection of mtry features from P (predictive features) is evaluated at each node, and the function with the highest Gain (Xi, mtry) is used to split the node v. Variable Xi importance score can be calculated as
(3)Impi=1ntree∑mtry∈SXiGainXi,mtry,whereSXi denotes the set of nodes divided by Xi in the RF using ntree. The RF importance scores are widely used to test the function contributions to class prediction. The number of trees (ntrees) used for each forest and the number of characteristics used at each split are the two most important parameters that determine random forest efficiency (mtry).Error rates can be evaluated in two ways. One way to do this is to split the dataset into two parts: training and testing. Forests can be created from the training phase, and error rates can be calculated from test parts. OutofBag (OOB) error estimation is another option. Because the random forests algorithm calculates the OOB error during the training phase, we do not need to partition the training data to retrieve the OOB error. The “OOB error” can be determined as follows:(4)OOBerror=∑inTreeOOBerrorinTree.(2)
Gray wolf optimization algorithm reviewBased on the previous study proposed by Lowe [34], the gray wolf optimization (GWO) algorithm is discussed in the following subsections.


### 2.1.1. GWO Inspiration

GWO resembles the hunting behavior of gray wolf packs which is established using three basic steps: (1) inclosing, (2) hunting, and (3) attacking. Gray wolves have a social hierarchy that classifies the domination and authority of wolves. The leading and dominating wolf in the gray wolf hierarchy is the alpha wolf which is responsible for decision making, hunting, and other pack activities. Beta wolf follows next in the hierarchy which represents the second and powerful wolf and will assist the alpha in decision making. Omega and delta are less effective, and they have the lowest ranking [33].


### 2.1.2. Mathematical Model of GWO

The GWO mathematical model is mainly comprised of three basic steps: inclosing, hunting, and attacking which are represented in the following equations [34, 35].
(i)
Encircling the preyIn the GWO mathematical model, the inclosing behavior is represented in the following equations:(5)X⟶t+1=Xp⟶t+A⟶.D⟶,whereD⟶ is defined in equation (5), t is the iteration number, A⟶, C⟶are coefficient vectors, Xp⟶ is the prey position, and X⟶ is the gray wolf position.The calculation for the vectorsA⟶, C⟶ is presented in the next equations:
(6)D⟶=C⟶.Xp⟶t−X⟶t,(7)A⟶=2A⟶.r1⟶−a⟶,(8)C⟶=2r2⟶,where components ofa⟶ are linearly decreased from 2 to 0 throughout iterations, and r1 and r2 are random vectors in [0, 1].
(ii)
Hunting the preyIn the hunting phase, gray wolves are leaded by alpha. The beta and delta could also help in hunting. To mathematically simulate the hunting behavior of gray wolves, it was assumed that the alpha (α) (fittest candidate solution), beta (β), and delta (δ) had better knowledge of the prey’s possible position. The first three best solutions guide the ω wolf to change its location in the decision space based on the position of the best search agents. Representing hunting mathematically can take the following equations:
(9)Dα⟶=C1⟶.Xα⟶−X⟶,Dβ⟶=C2⟶.Xβ⟶−X⟶,Dδ⟶=C3⟶.Xδ⟶−X⟶,(10)X1⟶=Xα⟶−A1⟶.Dα⟶,X2⟶=Xβ⟶−A2⟶.Dβ⟶,Xδ⟶=Xδ⟶−A3⟶.Dδ⟶,(11)X⟶t+1=X1⟶+X2⟶+X3⟶3.(iii)
Attacking the preyThe attacking of the prey is dependent on the vectora⟶where its value is linearly updated in each iteration to range 2 to 0 according to the following equation
(12)a⟶=2−t.2Maxiter,where t is the iteration number, andMaxiter is the total number of iterations allowed for the optimization.
(3)
Particle swarm optimization (PSO)PSO was initially developed by Kennedy and Eberhart in 1995 [36]. Due to its optimization accuracy, many researches were conducted on PSO to solve a variety of engineering optimization problems. PSO is a heuristic global optimization method as well as a swarm intelligence-based optimization algorithm. The concept of PSO emerges from the behavior of swarm particles and the social interaction between particles. When looking for food, the birds either disperse or move together to find it. The birds move from one location to another in search of food, and the bird closest to the food can smell it. PSO’s basic algorithm is made up of n swarm particles, and the position of each particle represents a potential solution. According to the three principles, the swarm particle changes its position.
(1)
Keep its inertia(2)
Update the condition relating to its optimal position


## 2.1.1. GWO Inspiration

GWO resembles the hunting behavior of gray wolf packs which is established using three basic steps: (1) inclosing, (2) hunting, and (3) attacking. Gray wolves have a social hierarchy that classifies the domination and authority of wolves. The leading and dominating wolf in the gray wolf hierarchy is the alpha wolf which is responsible for decision making, hunting, and other pack activities. Beta wolf follows next in the hierarchy which represents the second and powerful wolf and will assist the alpha in decision making. Omega and delta are less effective, and they have the lowest ranking [33].


## 2.1.2. Mathematical Model of GWO

The GWO mathematical model is mainly comprised of three basic steps: inclosing, hunting, and attacking which are represented in the following equations [34, 35].
(i)
Encircling the preyIn the GWO mathematical model, the inclosing behavior is represented in the following equations:(5)X⟶t+1=Xp⟶t+A⟶.D⟶,whereD⟶ is defined in equation (5), t is the iteration number, A⟶, C⟶are coefficient vectors, Xp⟶ is the prey position, and X⟶ is the gray wolf position.The calculation for the vectorsA⟶, C⟶ is presented in the next equations:
(6)D⟶=C⟶.Xp⟶t−X⟶t,(7)A⟶=2A⟶.r1⟶−a⟶,(8)C⟶=2r2⟶,where components ofa⟶ are linearly decreased from 2 to 0 throughout iterations, and r1 and r2 are random vectors in [0, 1].
(ii)
Hunting the preyIn the hunting phase, gray wolves are leaded by alpha. The beta and delta could also help in hunting. To mathematically simulate the hunting behavior of gray wolves, it was assumed that the alpha (α) (fittest candidate solution), beta (β), and delta (δ) had better knowledge of the prey’s possible position. The first three best solutions guide the ω wolf to change its location in the decision space based on the position of the best search agents. Representing hunting mathematically can take the following equations:
(9)Dα⟶=C1⟶.Xα⟶−X⟶,Dβ⟶=C2⟶.Xβ⟶−X⟶,Dδ⟶=C3⟶.Xδ⟶−X⟶,(10)X1⟶=Xα⟶−A1⟶.Dα⟶,X2⟶=Xβ⟶−A2⟶.Dβ⟶,Xδ⟶=Xδ⟶−A3⟶.Dδ⟶,(11)X⟶t+1=X1⟶+X2⟶+X3⟶3.(iii)
Attacking the preyThe attacking of the prey is dependent on the vectora⟶where its value is linearly updated in each iteration to range 2 to 0 according to the following equation
(12)a⟶=2−t.2Maxiter,where t is the iteration number, andMaxiter is the total number of iterations allowed for the optimization.
(3)
Particle swarm optimization (PSO)PSO was initially developed by Kennedy and Eberhart in 1995 [36]. Due to its optimization accuracy, many researches were conducted on PSO to solve a variety of engineering optimization problems. PSO is a heuristic global optimization method as well as a swarm intelligence-based optimization algorithm. The concept of PSO emerges from the behavior of swarm particles and the social interaction between particles. When looking for food, the birds either disperse or move together to find it. The birds move from one location to another in search of food, and the bird closest to the food can smell it. PSO’s basic algorithm is made up of n swarm particles, and the position of each particle represents a potential solution. According to the three principles, the swarm particle changes its position.
(1)
Keep its inertia(2)
Update the condition relating to its optimal position


## 2.2. Update the Condition to the Swarm’s Most Optimal Position

### 2.2.1. Feature Extraction

Before computing the texture features, all red/green/blue (RGB) images were converted to grayscale and depicted as the overall intensity distribution per class, as shown in Figure2, to evaluate the difference between samples in each group.Figure 2
Overall intensity distribution per class.It was clear from Figure2 that the intensity values of all histological images of the applied dataset are very various. The distributions of categories (tumor, stroma, complex, and lymph) are convergent and contradictory to categories (debris, mucosa, adipose, and empty). Moreover, images of adipose and empty are of very high intensity, and the intensity distributions are very similar which makes it difficult to distinguish. We should find out their meanings as adipose may be very tough to distinguish from empty. And does empty mean, no image at all. To get a clearer understanding of the extent of overlaps, densities were plotted against intensities for each attribute in Figure 3, the categories that demonstrated significant overlaps with one another are (tumor and immune cells), (mucosal glands and simple stroma), and (complex stroma and muscol glands).Figure 3
Overlaps between different categories of tissue (x and y-axis denote the density and intensity, respectively).Comparing tumors to immune cells in Figure3, it can be observed that overlap is seen around the value of 75 (both high in density), and the total range of overlap extends from around 70 to 80. Therefore, if pixel values alone were used to generate classifiers, these two classes would have the highest chance to get mixed up with one another. Beyond that, they have similar shapes of density, similar mean, and standard deviation, which makes it difficult to differentiate by the first moments. To differentiate them, a look at their potential differences at higher moments might be taken, or RGB data might be pursued and color information might be used. As for mucosal glands compared to other stromas, MG’s extremely large values overlap a little with simple stroma’s extremely small values, and the opposite happens for MG vs. complex.The variation of image intensity distributions between classes inspired us to perform feature extraction based on the gray-level cooccurrence matrix (GLCM). The GLCM is a highly effective tool for extracting image features that map the probabilities of gray level cooccurrence based on pixel spatial relationships in various angular directions. We used four directions (0°, 45°, 90°, and 135°) and five displacement vectors (from 1px to 5px). To make this texture descriptor invariant concerning rotation, we averaged the GLCMs obtained from all four directions for each displacement vector.GLCM usage can lead to extract features such as information measure of correlation1, autocorrelation, entropy, dissimilarity, correlation, cluster prominence, contrast, cluster shade, energy, homogeneity, maximum probability, sum of squares variance, sum variance, sum average, sum entropy, difference variance, difference entropy, information measure of correlation 2, inverse difference normalized (INN), inverse difference homogenous (INV), and inverse difference moment normalized.


## 2.2.1. Feature Extraction

Before computing the texture features, all red/green/blue (RGB) images were converted to grayscale and depicted as the overall intensity distribution per class, as shown in Figure2, to evaluate the difference between samples in each group.Figure 2
Overall intensity distribution per class.It was clear from Figure2 that the intensity values of all histological images of the applied dataset are very various. The distributions of categories (tumor, stroma, complex, and lymph) are convergent and contradictory to categories (debris, mucosa, adipose, and empty). Moreover, images of adipose and empty are of very high intensity, and the intensity distributions are very similar which makes it difficult to distinguish. We should find out their meanings as adipose may be very tough to distinguish from empty. And does empty mean, no image at all. To get a clearer understanding of the extent of overlaps, densities were plotted against intensities for each attribute in Figure 3, the categories that demonstrated significant overlaps with one another are (tumor and immune cells), (mucosal glands and simple stroma), and (complex stroma and muscol glands).Figure 3
Overlaps between different categories of tissue (x and y-axis denote the density and intensity, respectively).Comparing tumors to immune cells in Figure3, it can be observed that overlap is seen around the value of 75 (both high in density), and the total range of overlap extends from around 70 to 80. Therefore, if pixel values alone were used to generate classifiers, these two classes would have the highest chance to get mixed up with one another. Beyond that, they have similar shapes of density, similar mean, and standard deviation, which makes it difficult to differentiate by the first moments. To differentiate them, a look at their potential differences at higher moments might be taken, or RGB data might be pursued and color information might be used. As for mucosal glands compared to other stromas, MG’s extremely large values overlap a little with simple stroma’s extremely small values, and the opposite happens for MG vs. complex.The variation of image intensity distributions between classes inspired us to perform feature extraction based on the gray-level cooccurrence matrix (GLCM). The GLCM is a highly effective tool for extracting image features that map the probabilities of gray level cooccurrence based on pixel spatial relationships in various angular directions. We used four directions (0°, 45°, 90°, and 135°) and five displacement vectors (from 1px to 5px). To make this texture descriptor invariant concerning rotation, we averaged the GLCMs obtained from all four directions for each displacement vector.GLCM usage can lead to extract features such as information measure of correlation1, autocorrelation, entropy, dissimilarity, correlation, cluster prominence, contrast, cluster shade, energy, homogeneity, maximum probability, sum of squares variance, sum variance, sum average, sum entropy, difference variance, difference entropy, information measure of correlation 2, inverse difference normalized (INN), inverse difference homogenous (INV), and inverse difference moment normalized.


## 2.3. The Proposed Algorithm

The hybrid algorithm was proposed based on GWO optimizer and RF (GWO -RF) to ensure recognition of multiclass texture analysis in colorectal cancer with better accuracy. The proposed algorithm takes the input of a set of features and returns the reduced subset of features and therefore upgrading the performance of the classifier model. The proposed algorithm process was summarized in Figure4 and described in the following steps:
(1)
Load the dataset(2)
Initialize the position of (α, β, and δ) with zero(3)
Initialize the variable score (α, β, and δ) with zero(4)
Randomly initialize the population of the wolves’ store(5)
Calculate the fitness function (f) using equation (13)(6)
Find the sigmoid ofX using equation (6)(7)
Update the positions of the agents(8)
Use the alpha pos for feature selection(9)
Apply the artificial neural networks (ANNs) classifier on the selected featuresFigure 4
Flowchart of hybrid proposed algorithm (GWO-RF).The fitness functionfis calculated using the following equation:
(13)f=PIM+Wf×1−NSNt.The permutation importance measure (PIM) for the permuted featureXj was computed using the following equation:
(14)PIMkXj=1ntree∑terrOOBtj−errOOBt,whereXj is the permutated feature. errOOBtj is the perturbed sample. errOOBt is the error of a single tree t on this OOB sample. Wf is the weight factor, creates a balance between the feature importance, PIM, and the number of selected features. The value of Wf is 0.7. NS is the number of selected features. Nt is the total number of features present in the dataset.


## 3. Experimental and Parameter Setting

The human colorectal cancer dataset containing 5,000 histological images was employed for training and testing. We divide the dataset into two parts, 90% for training and validation (80% training, 100 10% validation) and 10% for testing, in 10-fold cross-validation. The training and testing procedures were conducted in Google Colab. The GWO algorithm and PSO parameters settings are outlined in Table2.Table 2
Parameter setting for (GWO) and (PSO).
AlgorithmParameterNumbersGWONumber of iterations100Wolves number5Dimensions number14Search domain[0 1]Swam size50Number of iterations100PSOCognitive parameter2Social parameter2Inertia weight0.9For random forest, we tunedmtreefor selected 9 features by the approach described in Section (2.3), and we attained the best performance at mtry=8 and the value of ntree=100 was obtained.To evaluate the proposed approach, three experiments were accomplished. Each experiment was divided into two phases. Feature selection methods were used in the first step to remove redundant and irrelevant features by looking for the best features in the colorectal cancer dataset. The highly successful classifier (ANN) was used in the second process, which depends on the optimum function subset obtained in the first phase. Figure5 shows the general structure of the proposed method. In the first experiment, all features were used without applying feature selection techniques. Then, two experiments were performed by employing the proposed feature selection method (GWO-RF) and a counterpart (PSO-RF) method for comparison.Figure 5
The experimental steps of the proposed approach.In addition, to evaluate our prediction ANN model classifier, other states of art classifiers KNN (k-nearest neighbor) and RF (random forest) were implemented and compared them with the proposed model.The ANN network model consisted of three layers, namely, input, hidden, and output layer. The input layer in experiment 1 had several nodes equal to the number of all features that are extracted from the dataset, while in experiments 2 and 3, the number of input nodes proportional to the size of features was extracted from the GWO- RF model and PSO-RF. Three hidden layers are used. Experiments are also performed with one and two hidden layers, but the best results are obtained by using three hidden layers. The output layer consists of eight neurons that represent all categories of a dataset. Activation functions were RLU (rectified linear units) and sigmoid for the hidden and output layers. The network was trained in 1000 epochs using the stochastic gradient descent (SGD) optimization algorithm and a learning rate of 0.0001.To ensure algorithm robustness, each experiment was run five times on each data set, and a confusion matrix was developed, and then the accuracy, precision, and sensitivity of the classifier were assessed using true positive (TP), true negative (TN), false-negative (FN), and false-positive (FP) values. These measures are calculated as follows:(15)Accuracy=TP+TNTP+TN+FP+FN×100%,(16)APrecision=TPTP+FP×100%,(17)Sensitivity=TPTP+FN×100%,


## 4. Results and Discussion

To evaluate the effectiveness of the implemented feature selection technique (GWO-RF) to enhance the ability of the ANN classifier to discriminate between eight distinct tissue types of human colorectal cancer histological images, a comparative analysis of the ANN classifier in three experiments was conducted using the confusion matrix and shown in Figures6–8.Figure 6
Confusion matrix of ANN model for the test set when using all features (without applying feature selection techniques).Figure 7
Confusion matrix of ANN model for the test set when using GWO-RF feature selection techniques.Figure 8
Confusion matrix of ANN model for the test set when using PSO-RF feature selection techniques.The output class in they-axis of the confusion matrix for the test set refers to the classifier’s prediction, while the target class in the x-axis refers to the true reference class. The confusion matrix’s diagonal shows the percentages of correct predictions for each category. The percentage of predicted errors is shown by the figures in the off-diagonal.By comparing the three matrices, the highest percentage of overall accuracy (98.74%) of the ANN classifier was achieved when using the GWO-RF feature selection technique in the experiment (2) which is shown in Figure7. GWO-RF model recommended 9 features to be fed into the ANN classifier which were information measure of correlation1 (IMC1), cluster shade, homogeneity, maximum probability, sum variance, sum entropy, difference variance, inverse difference homogenous (INV), and inverse difference moment normalized.The confusion matrix for the test set in Figure8 indicates that the percentage of overall accuracy was reduced from 98.74% to 94.11% when using the PSO-RF feature selection technique in the experiment (3). The PSO-RF model selected 14 features which were contrast, autocorrelation, energy, information measure of correlation1 (IMC1), cluster shade, homogeneity, maximum probability, sum variance, sum entropy, difference variance, inverse difference homogenous (INV), and inverse difference moment normalized. On the other hand, the results observed in Figure 6 revealed that the overall accuracy of the ANN significantly dropped in the experiment (1) to 91.45% when using all features (21 features) without applying feature selection techniques.Based on the results of three experiments, the advantages of GWO over other PSO algorithms are simple implementation with a simple structure, low memory and computational requirements, fast convergence with continuous reduction of search space, and few coefficients of determination [37], two to avoid local minima and tune algorithm performance. A function that has only control parameters. This improves stability and robustness.To examine the study more extensively, the precision and sensitivity for the ANN classifier were computed in each experiment, and the results were shown in Figures9 and 10. In general, a significant gap between the percentage of precision and sensitivity for the ANN classifier was apparent when using the GWO-RF feature selection technique as compared to the PSO-RF feature selection method and when employing all features. The ANN classifier achieved overall precisions and sensitivities of 99%, 99% when applying GWO-RF, 94%, 94% when applying PSO-RF, and 92%, 92% when not using any feature selection method, respectively.Figure 9
Classification precision of ANN model in all experiments.Figure 10
Classification of ANN model in all experiments.Furthermore, Figures9 and 10 indicate that the performance of the ANN classifier for all eight tissue types in colorectal cancer was significant when using the proposed GWO-RF feature selection method which reveals the efficient performance of the proposed model. Example images of ANN classifier misclassification were shown in Figure 11. While the precision and sensitivity for the ANN classifier for all eight classes when applying the PSO-RF feature selection technique and all features were very close to each other. Also, we can observe that when employing all features and the PSO-RF feature selection method, the values of precisions were minimal when the ANN classifier discriminated classes 2 and 5 tissue types, and the lowest value of sensitivity was attained when discriminating class 2 tissue type. This outcome indicates the inefficient performance of the ANN classifier when employing the PSO-RF model and without applying any feature selection technique.Figure 11
Example images of misclassification: (a) simple stroma, (b) adipose tissue, and (c) debris and mucus.
(a)(b)(c)To interpret the ANN model and to show the relative importance of each feature and its effect on the model prediction performance, an aggregate SHAP bar graph was performed and shown in Figure12. The SHAP bar graph plots the mean absolute SHAP value for each feature [38, 39]. It was noticed from the SHAP bar graph that the most important features that had a significant effect on the ANN model’s prediction were ranked from the most important to the least important. The order of the features is the information measure of correlation1 (IMC1), homogeneity, sum variance, maximum probability, difference variance, inverse difference moment normalize, inverse difference homogenous (INV), sum entropy, and cluster shade.Figure 12
SHAP bar plot to show the global importance for each feature.It is also noticeable in Table3 that the ANN classifier attained a significantly higher accuracy than the corresponding counterpart classifiers.Table 3
Comparison between ANN model and state of art methods.
Performance metricsANNKNNRFAccuracy98.74%94.2%90.3%Sensitivity99%94.5%73%Specificity99%93.2%91.5%Table4 shows the comparison of similar works conducted to classify multiclass texture analysis in colorectal cancer. The highest accuracy results were achieved using our proposed GWO-RF feature selection process (98%). In addition, the ANN classifier could classify the largest number of classes (eight distinct tissue types) as compared to the other studies which signify the impressive outcomes for the proposed GWO-RF feature selection method.Table 4
Comparison of works conducted on classify multiclass texture analysis in colorectal cancer.
Author(s)Number of class classificationMethod usedClassifierAccuracy (%)Wu et al. [24]Four typesColor channel histograms, GLCM,Logistic regression classifier75.15%Liu et al. [25]Two typesGLCMSupport vector machines (SVM)96.67%.Liu et al. [26]Three types2D discrete wavelet (DW)Neural networks91.11%J Malik et al.Four typesDeep learningCNN95%The proposed methodEight typesGWO-RFANN98%


## 5. Conclusion

A novel wrapper feature selection approach is proposed in this paper to decide the best feature subset for multiclass texture analysis classification in colorectal cancer histology. Gray wolf optimization (GWO) and random forest (RF) algorithm were utilized to find the best features in the histological images of the human colorectal cancer dataset. Then, based on the best-selected features, the artificial neural networks (ANNs) were applied to classify multi-class texture analysis in colorectal cancer. The results revealed that the presented work (GWO-RF) feature selection method has outperformed other state of art methods where it achieved overall accuracy, precision, and sensitivity rates of 98.74%, 98.88%, and 98.63%, respectively. These results are very promising and show the superior and efficient performance of the presented method in handling high dimensional and redundant data for early CRC diagnosis with high classification accuracy. The proposed model can be further applied in the future for the classification of another various cancer histology, reducing the time, cost, and effort of large searching space. The proposed model can be further applied in the future for the classification of another various cancer histology, reducing the time, cost, and effort of large searching space [40–46]. Moreover, the presented technology by the authors in [47–50] can be implemented to obtain better results.



---

*Source: 7614264-2022-05-05.xml*