# Exploiting Domain Knowledge to Address Class Imbalance in Meteorological Data Mining
## 4 Methodology  
Since the focus of our study was to address the class imbalance problem, we used a number of sampling strategies in order to balance the training datasets used in the classification task. Besides the training dataset with the natural distribution of the precipitation values that are shown in Tables 1 and 2 (Strategy 1), we created nine more balanced training datasets following different strategies (Strategies 2-10) (Table 5). Two of them followed the 30% distribution regarding the minority class variable and the other seven the balanced distribution (50%). In the following we describe Strategies 2 through 10. In the second and third strategies, we used the randomized undersampling method to remove examples producing two datasets with a 30% (U30) and a 50% (U50) distribution of the minority class, respectively [5]. Likewise, in the fourth and fifth strategies, we used a combination of the SMOTE oversampling method to create new examples of the minority class and the randomized undersampling method to remove examples from the majority class, achieving a 30% (SU30) and a 50% (SU50) distribution of the minority class, respectively. We ran the SMOTE oversampling method in the WEKA environment, using 3 nearest neighbors [14; 20; 21]. In the sixth strategy (BW), we formed balanced datasets not only between-classes but also within-classes [15]. Thus, we employed the randomized undersampling method to reduce the number of the examples for the large clusters of 'Rain/Drizzle' and 'Fair/Cloudy' and the SMOTE oversampling method to increase the number of the examples for the \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Component** & **Variable** & **Total** & **\% of Variance** & **\% Cumulative** \\ \hline
1 st & geopotential height 200 hPa & 9.8 & 28 & 28 \\ \hline
2 nd & relative vorticity 1000 hPa & 4.2 & 11.9 & 39.9 \\ \hline
3 rd & wind direction 300 hPa & 2.9 & 8.4 & 48.3 \\ \hline
4 th & wind speed 300 hPa & 2.6 & 7.5 & 55.7 \\ \hline
5 th & wind speed 925 hPa & 2.4 & 7 & 62.7 \\ \hline
6 th & divergence 300 hPa & 2.3 & 6.7 & 69.4 \\ \hline
7 th & temperature 200 hPa & 2.1 & 6 & 75.4 \\ \hline
8 th & potential vorticity 500 hPa & 1.8 & 5 & 80.4 \\ \hline
9 th & wind direction 925 hPa & 1.7 & 4.8 & 85.2 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Variance explained by rotated components and the representative variables. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Component** & **Most Highly Correlated Initial Variable** & **Other Highly Correlated Initial Variables** \\ \hline
1 st & geopotential height on 200 hPa & geopotential height in the upper levels, the temperature almost in all levels, and the specific humidity in low levels of the atmosphere \\ \hline
2 nd & relative vorticity on 1000 hPa & relative vorticity in low levels, the geopotential height on 925 hPa, and the pressure at mean sea level \\ \hline
3 rd & wind direction on 300 hPa & wind direction in middle and upper levels \\ \hline
4 th & wind speed on 300 hPa & wind speed in upper levels \\ \hline
5 th & wind speed on 925 hPa & wind speed in low levels \\ \hline
6 th & divergence on 300 hPa & vertical velocity in the upper levels \\ \hline
7 th & temperature on 200 hPa & relative vorticity on 200 hPa \\ \hline
8 th & potential vorticity on 500 hPa & relative vorticity on 500 hPa \\ \hline
9 th & wind direction on 925 hPa & wind direction in low levels \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Most highly correlated variables to the rotated components. small clusters of 'Snow/Sleet', 'Thunder' and 'Fog'. Thus, the sum of the 'Rain/Drizzle', 'Snow/Sleet' and 'Thunder' examples that belong to the minority class became equal to the sum of the 'Fair/Cloudy' and 'Fog' examples of the majority class achieving the between-class balance. Moreover, the number of the 'Rain/Drizzle', 'Snow/Sleet' and 'Thunder' examples became equal to each other, and, similarly, the number of 'Fair/Cloudy' and 'Fog' examples became equal to each other achieving the within-class balance.