## 3 Class Imbalance Problem
### Genetic Algorithm Architecture for Class Imbalance Problem
#### 3.4.2 Genetic Operators
2:for\(i\gets 1,\alpha\)do
3:\(\Theta^{+}\leftarrow\) Genetic Algorithm (\(C_{k}\)) with Elite parents \(C_{k}\)
4:for\(j\gets 1,\frac{P}{2}\)do
5:\([P_{1},P_{2}]\leftarrow\) rand(2)
6:\([C_{1},C_{2}]\leftarrow\) rand(2)
7:\(\hat{\[PERSON]_{1}}=[\hat{\theta}_{P1,1}\rightarrow\hat{\theta}_{P1,C1};\hat{ \theta}_{P2,C1}\rightarrow\hat{\theta}_{P2,C2};\hat{\theta}_{P1,C2}\rightarrow \hat{\theta}_{P1,N};]\)
8:\(\hat{\[PERSON]_{2}}=[\hat{\theta}_{P2,1}\rightarrow\hat{\theta}_{P2,C1};\hat{ \theta}_{P1,C1}\rightarrow\hat{\theta}_{P1,C2};\hat{\theta}_{P2,C2}\rightarrow \hat{\theta}_{P2,N};]\)
9:if m = 'elitism asymmetric' then
10: evaluate \(J(\Theta_{k})=argmin\left\|\frac{1}{2m}\left(C_{k}-\Theta_{j}\right)\right\|^ {\alpha}\)
11:else
12: evaluate \(\hat{\Theta_{n}}=||\;\hat{\Theta}<\Theta\;||,n=\{1\to M\}\)
13: evaluate \(J(\Theta_{k})=argmin\left\|\frac{1}{2m}\left(C_{k}-\Theta_{j}\right)\right\|^ {\alpha}\)
14:endif
15:endfor
16:endfor
17:\(\left|\;d\;\right|^{+}=|\;d\;\right|^{In our implementation, we generate \(\alpha=500\) chromosome populations, and select the optimal set on the basis of the objective function. The termination criterion in our work is the parameter \(\alpha\) for a particular class \(C_{k}\). Hence, GA will automatically terminate for a particular class when it selects the optimal population amongst \(\alpha\) generated populations.

**4. Genetic Classifier Comity Learning for Image Classification**

The main idea behind this work is that all the images present in the image repository are represented in the form of feature vectors. These feature vectors serve as image signatures to represent the visual attributes of the images. From this feature repository we select a subset of feature vectors from each of the \(N\) classes and generate a training repository. As this sub-repository has the representation of the images of the \(N\) different classes, therefore samples in each class are naturally skewed compared to the total number of samples of other classes; therefore, before classifier training, we overcome this problem by re-framing the multi-class image classification problem into multiple one class image classification problems. For this, for each class of concern we generate a growing set of positive samples in the class through GA by following an asymmetric and symmetric bagging-based process. The asymmetric and symmetric bagging-based process overcomes the class imbalance problem and provides a working base for the SVM and ANN classifiers. For image classification, we combine the opinions of multiple classifiers through classifier comity learning and as the classification efficiency is strongly dependent upon the training sets that are obtained through the GA, we named the classifier comity learning method as the Genetic classifier comity learning (GCCL) method. Once the classifier training is successfully done, we obtain the semantic association of the query image with respect to the \(N\) training classes, and generate the output image-set. Our output image-set comprises of the samples of the obtained semantic class of the query image. For this we compute the distance amongst feature vectors of the query image and feature vectors of the image samples of the obtained semantic class and return the output set comprising images of the closely matched feature vectors. If the output set contains the samples of unwanted classes, then we suppress these samples through relevance feedback. The relevance feedback retrains the model over the user feedbacks in the output set, where images are labelled as either relevant or irrelevant by the system user. Once the retraining is done, the final output is generated, otherwise the user can provide the feedback again. The details of the process are provided in Figure 2 and are discussed in detail in the following subsections.

Figure 2: Architecture of the Proposed Method.

### Image Classification through Support Vector Machines

#### 4.1.1 Asymmetric Bagging Based on Elitism for Support Vector Machines

Bagging incorporates the advantages of bootstrapping and aggregation. Several training sets which are produced by the bootstrapping are used to generate multiple classifiers [21]. In the perspective of binary classification, if we bootstrap the training samples of only one class then bagging is known as asymmetric bagging.

For elitism based asymmetric bagging, we are selecting original chromosomes representing training images present in a skewed class. These chromosomes are used for population generation and newly generated offspring are not allowed to further reproduce. In elitism based asymmetric bagging, positive sample size is equal to the population size, and negative samples are not bootstrapped, therefore all images present in the negative sample set are used for training purposes. The asymmetric bagging procedure is described in Algorithm 2. The Genetic Algorithm (Algorithm 1) considers the case of asymmetric bagging and returns the grown training set on the basis of the objective function. This set is used for the SVM training with the concept of one-against-all (OAA) classification.
```
1:Positive set \(\{C_{k}\}\), negative set \(\{C_{i}-C_{k}\}\), weak classifier \(I\) (SVM), integer \(T=3\) (number of generated classifiers) and the test sample \(x\)
2:Classifier \(C^{*}\)
3:for\(i\gets 1\)to \(T\)do
4:\(\Theta^{+}\leftarrow\) Genetic Algorithm(\(\{C_{k}\}\)) with Elitism asymmetric
5:\(\Theta^{+}\leftarrow\) bootstrap samples from \(\{C_{k}\}\)
6:\(\Theta^{-}\leftarrow\{C_{i}-C_{k}\}\)
7:\(\hat{C}_{j}=I(\Theta^{+},\Theta^{-})\)
8:endfor
9:\(C^{*}(x)=\textit{aggregation}\{\hat{C}_{j}(x,\Theta^{+},\Theta^{-}),1\leq j\leq T\}\)
```
**Algorithm 2** Asymmetric bagging based on elite parents through GA for SVM.

#### 4.1.2 Bagging Based on Tournament Selection for Support Vector Machines

For bagging based on tournament selection, newly generated offspring can reproduce as well. However, only those offspring are allowed to reproduce which pass the evaluation test. Our chromosome evaluation test is:

\[\hat{\Theta}_{n}=||\ \hat{\Theta}<\Theta\ ||,n=\{1\to M\}, \tag{19}\]

where \(\hat{\Theta}\) are the newly generated offspring, \(\Theta\) are the elite parent chromosomes, and \(M\) is the population size.