# On IoT-Friendly Skewness Monitoring for Skewness-Aware Online Edge Learning
## 5 Validation and Discussion about Skewness-Aware Online Edge Learning
### Automatic Decision Making in Sample Size for Initial Training  
Before making predictions at runtime, online learning needs to accumulate a certain number of training data to obtain the first version of model. The de facto strategy seems to use a random or an experience-based size of samples for initial training. For example, the study [14] initializes online learning models using the first 100 observations by default, or using a manually input number of observations. (The variable numLags at [[https://github.com/chickenbestlover/Online-Recurrent-Extreme-Learning-Machine/blob/master/run.py](https://github.com/chickenbestlover/Online-Recurrent-Extreme-Learning-Machine/blob/master/run.py)]([https://github.com/chickenbestlover/Online-Recurrent-Extreme-Learning-Machine/blob/master/run.py](https://github.com/chickenbestlover/Online-Recurrent-Extreme-Learning-Machine/blob/master/run.py)), accessed on 10 August 2021). Inspired by the aforementioned first strategy of dealing with skewed data, we propose employing CSS to monitor the skewness of accumulated samples against a predefined threshold, so as to decide the initial training dataset automatically. For ease of comparison, we directly reused the online learning implementations in [14] and slightly modified the source code into a skewness-aware version. Firstly, we commented out the code of standardising the whole dataset, because the online learning \"model does not know how many data will be presented\" [26]. Secondly, we supplemented Algorithm 3 to the original source code for real-time monitoring of skewness. In particular, since the reported datasets are generally balanced (cf. Section 5.2), we define the skewness threshold to be 0.05 after taking the absolute value. When the online-sequential extreme learning machine (OS_ELM) over the New York City taxi passenger dataset (i.e., nyc_taxi.csv) is used as an example, the time-series prediction results from executing the original program and our skewness-aware version are both plotted in Figure 2. It should be noted that we kept the default neural network setting (i.e., 100 input neurons, 23 hidden neurons, and 1 output neuron) in this test. In general, every single neuron in a neural network will receive a group of weighted inputs and then return an output after applying an activation function. Given this typical three-layer architecture of the default setting, the input-layer neurons represent individual attributes of the dataset to be learned, the hidden-layer neurons are equipped with non-linear activation functions to be able to solve non-linear problems, and the output-layer neurons can eventually deliver an output that represents the neural network's prediction. Compared with the original implementation that uses 100 observations (with skewness value \(-0.5589\)) in the initial training, our skewness-aware program automatically selects the first 26 observations (with skewness value \(-0.0157\)) to train the initial model. According to the plot shown in Figure 2, intuitively, using fewer training data does not seem to make negative impact on the predication results. On the contrary, the predicted values from the skewness-aware version even better fit the observed values in many cases, e.g., the time series points from 12,150 to 12,160 and from 12,200 to 12,210. To compare our skewness-aware model with the original model in an objective way, we decided to assess their prediction accuracy quantitatively. Specifically, we follow the study [14] to employ the normalised root-mean-square error (NRMSE) to measure the difference between the observed values and the predicted values. Without standardising the whole dataset, the NRMSE of the original OS_ELM is about 70.06%, while the skewness-aware OS_ELM has a clearly better forecast accuracy at a lower NRMSE value 53.88%. We further tested different neural network sizes by gradually increasing the number of hidden neurons.