## 3 Class Imbalance Problem
### Genetic Algorithm Architecture for Class Imbalance Problem
#### 3.4.2 Genetic Operators
According to the evaluation test we are generating a population of \(M\) chromosomes, and allowing only those offspring chromosomes to reproduce that are giving less distance for any of the elite parents. In bagging based on tournament selection, positive and negative sample size is the same in which is equal to the population size. We are randomly selecting samples from the negative set to generate balanced training set. Our bagging procedure is presented in Algorithm 3. #### 4.1.3 Semantic Association Using Support Vector Machines

SVM is known for its amazing accuracy and performance on various pattern recognition problems, and has been acknowledged as a potential and powerful tool for classification problems [22]. For a given training-set having images from \(N\) semantic classes, an SVM classifier is defined for a specific class that can be modelled as [39]:

\[\{(x_{i},y_{i})\}_{i=1}^{m}y_{i}=\{+1,-1\}, \tag{20}\]

where \(x_{i}\) and \(y_{i}\) are the inputs and corresponding labels, respectively. Samples belonging from the positive class are labelled as \(+1\) and all other samples are labelled as \(-1\). In feature space, the SVM model takes the form [22]:

\[y(x)=w^{T}\varphi x+b, \tag{21}\]

where \(\varphi(. )\) is used as the non-linear mapping to map the input vector into higher dimensional feature space, \(b\) is the bias and \(w\) is a weight vector of the same dimension as that of the input vector. SVM assumes the linearly separable case as:

\[\left\{ \begin{array}{l l}w^{T}x_{i}+b\geq+1&\quad\text{if }\ y_{i}=+1\\ w^{T}x_{i}+b\leq-1&\quad\text{if }\ y_{i}=-1\end{array} \right\} \tag{22}\]

However, the image classification in the presence of multiple correlated semantic classes is usually non-linearly separable, therefore, the non-separable case is expressed as:

\[\left\{ \begin{array}{l l}w^{T}\varphi(x_{i})+b\geq+1&\quad\text{if }\ y_{i}=+1\\ w^{T}\varphi(x_{i})+b\leq-1&\quad\text{if }\ y_{i}=-1\end{array} \right\} \tag{23}\]

through the nonlinear kernel function, a maximum margin separating hyperplane can be computed by finding the margin \(2/\|w\|\) hyperplanes to separate both classes, that transform the problem into a quadratic programming problem as we adopted in the proposed work. In our implementation we used the quadratic kernel which finally results as:

\[F(x)=sgn\bigg{(}\sum a_{i}y_{i}K(x,x_{i})+b\bigg{)}, \tag{24}\]

where \(F(x)\) in Equation (24) is the hyperplane decision function. The Lagrangian multiplier \(a_{i}\) serves as the support vectors and are used to solve the quadratic programming problem that satisfies the Karush Kuhn Tucker (KKT) conditions. The higher values of \(F(x)\) means the higher prediction confidence,whereas the lower values mean the pattern is close to the boundary. In present work SVM is trained through the asymmetric and symmetric bagging procedures as described earlier. ### Image Classification through Artificial Neural Networks

Asymmetric Bagging for Neural Networks

For all semantic classes, a back-propagation neural network structure is also defined [40] with one hidden layer having 30 neurons and one output unit. For hidden and output layer sigmoid function is used as transfer function. Detail of the neural network structure is summarized in Table 1 and the ANN training procedure is listed in Algorithm 4. One important thing to note is that the neural networks training occurs on the training sets that are obtained by sub-sampling negative class and GA is not involved in this procedure. ```
0: Positive set \(\{C_{k}\}\), negative set \(\{C_{i}-C_{k}\}\), weak classifier \(I\) (ANN), integer \(T=1\) (number of generated classifiers) and the test sample \(x\)
0: Classifier \(C^{*}\)
1:for\(i\gets 1,T\)do
2:\(S_{i}^{-}\leftarrow\) bootstrap samples from \(\{C_{i}-C_{k}\}\)
3:\(\{C_{k}\}\leftarrow\{C_{k}\}\)
4:\(\hat{C}_{i}=I(S_{i}^{+},S_{i}^{-})\)
5:endfor
6:\(C^{*}(x)=\textit{aggregation}\{\hat{C}_{i}(x,S_{i}^{+},S_{i}^{-}),1\leq i\leq T\}\)
```
**Algorithm 4** Asymmetric bagging using neural networks.