Table 2.
The GRSOMO and GRSOMU algorithms
| (i) Let be the original unbalanced training set with samples, where . And let , where contains only the data in the minority class with samples and contains only data in the majority class with samples |
| (ii) IF GRSOMO is desired THEN DO steps (iii)–(v) |
| (iii) Use GRSOM to generate new data from for samples such that is used as an input of the GRSOM function, i.e. GRSOM(,) where . Then, the function will return the samples which are contained in the new grown data set , i.e. GRSOM(,). Note that, in the case of over-sampling approach, |
| (iv) and . Thus, the number of samples in the minority class can be adjusted from to samples which equals to the number of samples in the majority class |
| (v) Define the balanced training set as and GO TO ix) |
| (vi) IF GRSOMU is desired THEN DO steps vii) to viii) |
| (vii) Use GRSOM to generate new data from for samples in which is used as an input of the GRSOM function, i.e. GRSOM() where . Then, the function will return the new grown data set with samples, i.e. , GRSOM(, ) |
| (viii) and . Note that only the samples will be generated for the majority class which equals to original number of samples in the minority class. This leads to the balanced training set |
| (ix) Return |
| (x) END |