## 3 Research Methodology
### Finding the Less Informative Majorities  
Generally, the bigger the \(SUM\_D\) is, the less informative the majority sample is, so we try to find out and remove the majority samples with big \(SUM\_D\) values. However, there is another situation to be noticed, when \(SUM\_D\) value is negative, it means this majority sample is in overlapping area or even in the minority class area. Samples like these are overlapping samples or noises, both possible results might have bad influence on performance of classification. Summarizing the rules above, we give the definition of less informative majorities.  
**Definition 2**: _Majority samples in datasets which have a too large or too small \(SUM\_D\) value are defined as the less informative samples._  
Order majorities with \(SUM\_D\), remove specified number of the first few and last few samples of the sequence from majorities. After removing, recalculate data distribution variables and repeat procedures introduced above until the imbalance problem is solved. The main components of LIMCR are described in Algorithm 1.  
```
Input: Threshold to stop iteration threshold. Step of iteration \(step\_a\) and \(step\_b\). Original training set \(S_{o}\) Output: Resampled dataset \(S_{new}\)
1 Split \(S_{o}\) into majority class set \(S_{Maj}\) and minority class set \(S_{Min}\).
2 Calculate prior probabilities of majority class and minority class: \(Prior\_P0\) and \(Prior\_P1\): \(Prior\_P0=\frac{|S_{Maj}|}{|S_{o}|};Prior\_P1=\frac{|S_{Maj}|}{|S_{o}|}\).
3 whilePrior_P0>thresholddo
4 Calculate mean value \(\overline{X}_{Majk}\) and variance \(S_{Majk}^{2}\) of feature \(k\) for samples in \(S_{Maj}\) (\(k=1,2,\cdots,m\); \(m\) =number of features).
5 Define \(P(X_{ik}=x_{ik}\mid Y=0)=\frac{1}{\sqrt{2\pi S_{Majk}^{2}}}\text{exp}(-\frac{(x _{ik}-\overline{X}_{Majk})^{2}}{2S_{Majk}^{2}})\).
6 Calculate mean value \(\overline{X}_{Mink}\) and variance \(S_{Mink}^{2}\) of feature \(k\) for samples in \(S_{Min}\) (\(k=1,2,\cdots,m\); \(m\) =number of features).
7 Define \(P(X_{ik}=x_{ik}\mid Y=1)=\frac{1}{\sqrt{2\pi S_{Mink}^{2}}}\text{exp}(-\frac{(x _{ik}-\overline{X}_{Misk})^{2}}{2S_{Mink}^{2}})\).
8\(S_{tempnew}=S_{0}\).
9\(S_{new}=S_{tempnew}\).
10 forsample \(X_{i}\in S_{Maj}\)do
11 for\(x_{ik}\in X_{i}(x_{ik}\) is the value of the kth feature of sample \(X_{i})\)do
12\(D_{ik}=P(X_{ik}=x_{ik}\mid Y=0)-P(X_{ik}=x_{ik}\mid Y=1)\) (hold 3 digits after the decimal point).
13\(D_{i}=\{D_{ik}\mid i=1,2,\cdots,m\}\).
14\(SIGN\_vector(i)=sign(D_{i})\).
15\(ABS\_vector(i)=abs(D_{i})\).
16 Sort element in \(ABS\_vector\) from smallest to largest and record the rank value into \(Rank\_vector\). If there are elements which have the same value, calculate the average rank of these elements.
17\(SUIM\_D_{i}=SIGN\_vector(i)^{T}\times Rank\_vector(i)\).
18 Number of samples need to be remove in this iteration: \(N_{a}=\mid S_{Maj}\mid\times step\_a;N_{b}=\mid S_{Maj}\mid\times step\_b.\)
19 Sort \(X_{i}\in S_{Maj}\) with \(SUM\_D_{i}\) from largest to smallest.
20 Remove the first \(N_{b}\) and the last \(N_{a}\) samples in \(S_{Maj}\).
21 Update \(S_{Maj}\).
22 Renew training datasets \(S_{tempnew}=S_{Maj}+S_{Min}\). Update \(Prior\_P0=\frac{|S_{Maj}|}{|S_{new}|};Prior\_P1=\frac{|S_{Min}|}{|S_{new}|}\).
23 end if
24 end for
25
26 end for return\(S_{new}\).
```  
**Algorithm 1**LIMCR: Less-informative majorities cleaning rule.