# Learning from Imbalanced Datasets: The Bike-Sharing Inventory Problem Using Sparse Information +
## 4 Numerical Results
### Predicting New Stations Using Only Exogenous Variables  
One of the main problems when using ML is the lack of endogenous variables. For instance, if a new station appears in the system, the endogenous features presented in  
Figure 7: MAE values for the UB (**a**) and LB (**b**) with and without resampling for existing stations. Table 1 cannot be used to predict inventory levels. Therefore, in this section, we test the same model as discussed in the previous section but with only exogenous and behavioral features. This model can be used, for instance, to predict the inventory levels when historical data are not available, as in the case of a new station. Table 3 shows the numerical results. As in the previous case, for the LB calculation, the RFC alone and in combination with the iterative resampling and BorderlineSMOTE has been used to make predictions. As expected, the results look worse than in the previous case, especially for the rare classes (36-71). When looking at the RFC, the MAE is fairly low for (0-35), while it is almost 10 times larger for (36-71), showing that data imbalance becomes more relevant when only exogenous variables are available. Concerning the other models, in this case, the BorderlineSMOTE performs better than the proposed iterative model for the dominant class, while it performs worse in terms of rare classes. This is related to the generalization problem and shows, as for the previous test, the tendency of the model to overfit the dominant class. With or without endogenous variables, the proposed iterative procedure achieves similar results for the minority and majority classes, showing that the model is less sensitive to overfitting. To remove possible collinearity issues and assess how the features affect the model, the approach was tested using different correlation cuts (see Table 4). Multicollinearity occurs when multiple features utilized by the ML classifier are strongly correlated. When features are correlated, they are unable to individually provide independent predictions for the dependent variable. Instead, they jointly explain a portion of the variance, thereby diminishing their individual statistical significance. In this section, multicollinearity is accounted for by performing hierarchical clustering on the Spearman's rank-order correlations, picking a threshold, and keeping a single feature from each cluster. As hierarchical clustering computes the information loss associated with aggregating two features, high thresholds will translate into larger clusters and higher information loss. This threshold is called a 'correlation cut', and it is one of the parameters of the model that we used to avoid overfitting. As discussed at the beginning of this section, during each iteration, we use feature selection to select which features should be used and which features should be excluded to avoid overfitting. A high correlation cut translates into a model with less features. Intuitively, more features (i.e., a low correlation cut) implies more overfitting while less features (i.e., high correlation cut) lead to poor model performance. The results confirm that the BorderlineSMOTE tends to overfit the dominant class with respect to the minority class and, in general, model performance is heavily influenced by the adopted correlation cut. The proposed iterative model, which makes predictions on an ensemble of classifiers and weights, provides more balanced predictions and an error that \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \multicolumn{2}{c}{**RFC with BorderlineSMOTE**} & \multicolumn{2}{c}{**RFC with Iterative Model**} \\
**Correlation Cut** & **MAE (0-35)** & **MAE (36–71)** & **MAE (0-35)** & **MAE (36–71)** \\ \hline
0.1 & 6.66 & 10.67 & 8.18 & 8.19 \\
0.3 & 6.68 & 9.07 & 8.41 & 8.36 \\
0.5 & 6.73 & 8.94 & 8.31 & 8.43 \\
0.7 & 6.66 & 9.40 & 8.16 & 8.51 \\
1 & 6.66 & 8.81 & 8.19 & 8.44 \\
1.2 & 10.45 & 21.39 & 11.43 & 8.17 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Results for the LB (with and without resampling) for new stations.