{'fraction_non_alphanumeric': 0.02801186384821807, 'fraction_numerical': 0.018313638717574503, 'mean_word_length': 4.595890410958904, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Imputation Techniques for Incomplete Load Data Based on Seasonality and Orientation of the Missing Values

In load data, the missing problem always occurs in a set of data. Since it has a seasonal pattern according to days, most of the time, the load usage for the next day is predictable. For this reason, a new model has been developed based on these characteristics. Data containing missing values being divided to its seasonality pattern and for each subdivision, the values from mean, the mean with standard deviation and third quartile are calculated before being rearrange to form a new set of values that will replace the missing values. These three values will be used as imputations for the missing values. To examine the effects of the orientation of the missing values with the choices of imputation, the missing values from the data are divided into three parts: at the front, in the middle and at the end of the data with 5%, 15%, and 25% of missing values. The results from root mean square error and mean absolute error show that the proposed techniques, particularly the mean and the third quartile value, are superior to the other complex methods when dealing with the missing values. The mean imputation is ample when the missing values is presence at the front and in the middle of the data while the third quartile value is superior when the missing values is at the end of the data.


INTRODUCTION
As mentioned by Winkler and McCarthy (2005), missing data are a very important and serious problem. The observations with missing values are important to show the new outcomes and indicate the absolute fit of a model. Thus, improvement is needed if there is any (Cumming et al. 2007). Missing values may occur due to lack of records, item non-response, machine failure to record observation during an experiment, lost records, and other issues (Kihoro & Athiany 2013). Addressing the issue of missing values is crucial in the process of getting precise and accurate results. As mentioned by Penn (2007), many studies in the literature suggested that how researchers deal with the missing data can influence model estimates and standard errors. The results could lead to biased estimates if the missing data are not treated appropriately. In some instances, the data cannot be analyzed either at the record level or for the overall database. Thus, it is vital to handle missing values properly in all types of analysis (Winkler & McCarthy 2005). Missing observations in time series data are very common since the data are recorded through time. When one or more observations are missing, it is essential to estimate the missing values to gain a better understanding of the nature of the data. As mentioned by Shukur and Lee (2015), imputing the missing values using an effective method is crucial before performing an analysis.
There a few methods that can be used to deal with the missing values. For instance, there are simple methods, such as list-wise deletion, pairwise deletion, and mean or mode substitution. A deletion method may be considered since it does not give effects to the analysis. Nevertheless, deletion could result in data loss, which will subsequently lead to a biased outcome and affects the skewness of the distribution (Cokluk & Kayri 2011;Honaker & King 2010). Thus, imputation could help protect the sample size. On the other hand, for mean or mode substitution, the mean value of the remaining observed values is calculated to replace the missing values. This process is considered to be appropriate if the researcher does not have other information (Cokluk & Kayri 2011). It is simple and quick to implement. Nevertheless, the issue of mean substitution is that the value could be unrealistic and even impossible if the value imputed comes from the known value of that particular field (Acock 2005). Thus, this method is not appropriate if the missing value is from marketing databases and surveys. This does not lead the analysis to the desired outcomes due to the poor quality of data (Winkler & McCarthy 2005). Furthermore, there are also other imputation methods, such as single imputation, hot-deck imputation, regression imputation, multiple imputations based on information of the maximum likelihood estimation, and the expectation-maximization (EM) algorithm (Acock 2005). Nevertheless, time series cross-section data often work poorly with these types of imputation methods (Honaker & King 2010). In the real world, to handle the missing values problem, different data require different strategies. Thus, it is necessary to utilize these strategies effectively to obtain the best possible estimates.
In the past, the approach to estimate the missing values for linear time series has involved the use of curve fitting. The details of these approaches can be discovered in many books (Brockwell & Davis 2013;Chatfield 2000;Gerald & Wheatley 2004;Hamilton 1994;Harvey 1990;Janacek & Swift 1993). Subsequently, the advanced models, such as Box-Jenkins model which incorporate space modelling and neural networks as applied to missing values (Damsleth 1980;Kihoro & Athiany 2013). The Box-Jenkins model has been used widely as a technique for dealing with missing values. The earliest study on missing values by using Autoregressive Integrated Moving Average (ARIMA) model written by Damsleth (1980). Damsleth combined forecast and back forecast of ARIMA model to handle the missing values in time series. Today, Box-Jenkins model is considered as a benchmark model for comparison in time series missing values (Ferreiro 1987;Gómez et al. 1992;Kihoro & Athiany 2013;Ruiz & Nieto 2000).
Hybrid models have also become famous recently as a method of imputation for missing values. To overcome the missing values problem, Sorjamaa and Lendasse (2007) combined a nonlinear model named the Self-Organized Maps (SOM) with the linear model Empirical Orthogonal Function (EOF). Furthermore, Honaker and King (2010) proposed multiple imputations to resolve the issue of missing values in time series cross-section data. Kihoro and Athiany (2013) rearranged their data according to their seasonal pattern and the missing values by using simple linear regression. A combination of Autoregressive (AR) and Artificial Neural Network (ANN) models have been used to impute the missing values by studying the pattern and stationarity of the wind speed data first (Shukur & Lee 2015). Zhang et al. (2017) combined three methods which are SOM clustering, the Fruit Fly Optimization Algorithm (FOA) and the Least Squares Support Vector Machine (LSSVM) to impute the missing values in their spatiotemporal data.

MATERIALS AND METHODS
Load data is considered as a time series data as it is recorded through time. Because it was recorded through time, load data has a cyclic pattern that makes a simple method such as mean substitution, linear interpolation and many more to provide a bad replacement to the missing values. It is relatively complicated to use an advanced model such as seasonal autoregressive integrated moving average (SARIMA) interpolation. By eliminating the cyclic pattern in the data, a simpler interpolation could be used as it converts the seasonal data to a linear data. Moreover, by arranging the data which include the missing value in its seasonal pattern, this could assist in eliminating the cyclic effects.
The load usage used in this study is recorded from Pusat Bandar Johor Bahru (PBJB). The load usage in PBJB is recorded for a year for every hour in 2010. The data are divided into three sections. The missing values are selected from these three sections. The first section is where the missing values will be taken from the front part of the data (P1). By referring to, the data recorded from 1st January till 30th April is classified as P1. The middle section is where we choose the missing values from the middle part of the data (P2). In this case, the P2 will be the part where the data is lie between 1st May and 31st August. The last section will be the missing values selected from the end of the data (P3) which is from 1st September until 31st December. As can be seen from Figure 1, each section is divided by the red dotted line.
From the plot in Figure 1, the cyclic pattern of the data is noticeable where it contains 'daily cycle' pattern. To understand the data further a statistical value of the data is generated. From Table 1, the minimum and maximum value in the data is 28751 kW and 73126 kW. Since the minimum and maximum value is quite distant, the standard deviation, gives quite large value which is 9671.63. The mean is at 59872 kW and most of the load values are closer to the maximum value which we can relate with plot in Figure 3 where most of the days the load is above 60000 kW.  Experts do not have any particular agreement on the percentage of the missing values that are suitable (Schlomer et al. 2010). Some suggested a 5% cut-off (Schafer 1999). On the other hand, some suggested 10% as the cut-off (Bennett 2001), whereas the other suggested 20% as the cut-off (Peng et al. 2006). Nevertheless, Schlomer et al. (2010) mentioned that there are two considerations while determining the amount of 'missing values' i.e. whether the result from the data set is sufficient enough to detect the effect of consequence and the pattern of the missing values. After considering two considerations mentioned by Schlomer et al. (2010), the percentage of missing data being considered is at 5%, 15%, and 25%, respectively. This study considered a year of recorded data and thus 25% missing values is considered sufficient for the highest missing values. By selecting these percentages, it is sufficient enough to observe the effects of the missing values. Since the pattern of the missing values in this study is continuous, these three percentages are suitable for the amount of missing values.
The disaggregation process is an important step considered in this study. A few important methods in time series, such as multiple linear regression, SARIMA and ANN models are being widely used as its consideration of the seasonality contains in the data. This study also put the seasonality into consideration by performing a disaggregation process. In this case, the seasonality is the days. The procedure of how the missing values are conducted as set out listed as follow. First step The original data are first being assumed to have a missing at random. The percentage of missing value considered in this case is 5%, 15%, and 25%. These percentages are selected. Second step Data are disaggregated or divided accordingly into days from Monday to Sunday. Considering the study has data with N observations, so this study has W = (W 1 , W 2 , W 3 , W 4 ..., W n ) where W represents the weekly period.
where x represents the day in the week that is selected.
The whole idea of the rearranging could be presented in a picture as set out below: where t X is the real time series data while they are the data after being rearranged by the day. Third step For each missing value, the mean, mean with standard deviation (mean +σ) and third quartile (Q3) values are calculated from each daily series to substitute the missing point. Fourth step After the missing points are substituted, the data for each day are rearranged into the original arrangement. Fifth step The dataset is compared with the original series to observe the performance. 1 = ( 1,1 , 1,2 , … , 1,6 , 1,7 ) 2 = ( 2,1 , 2,2 , … , 2,6 , 2,7 ) 3 = ( 3,1 , 3,2 , … , 3,6 , 3,7 ) 4 = ( 4,1 , 4,2 , … , 4,6 , 4,7 ) ⋮ = ( ,1 , ,2 , … , ,6 , ,7 ) This study considers three imputations. The mean of the data with missing value is considered as the first imputation. Since the seasonality of the data has been removed from the load data, the data become linear. If the data are normal, the mean substitution will be the most suitable imputation for the data.
Other than the mean, this study also considers mean +σ as one of the imputations. This imputation is considered and suitable when the data fluctuate extremely from one point to another. The data occasionally can be extreme due to certain events and holidays. Therefore, by adding the standard deviation to the estimated mean, it provides a greater estimation. Greater estimation is important since the overestimated value is better compared to underestimated value as the load shortage of power supply can cause electricity disruptions. To obtain one, this study only selects the positive standard deviation by adding absolute to the standard deviation.
Other than the two imputations, this study also considers the third quartile (Q3) value imputation. Q3 value is a limit where 75% data are containing below this value. As they are not affected by extreme observations, then Q3 can be a better measure than the mean. Therefore, it can also be a good imputation for a missing value especially if the data are slowly increased over the time.
Since this method involving disaggregation process before being imputed with three different imputation, the method is named as disaggregation-and-imputation (DI) method where DI1 use the mean imputation, DI2 use the mean +σ imputation and DI3 use the Q3 imputation. This method is conducted by using Minitab software. The framework of the study is explained in Figure 2. After data is being disaggregate according to days, the mean, mean+σ and Q3 values are calculated respectively for the 5% missing values, 15% missing values and 25% missing values. Other than that, these values are also calculated for each orientation P1, P2, and P3. After we obtained these values for each of the day, these values will be repositioned into its original sequence to form a set of data that will substitute the missing values. Herewith is the values of the mean, mean+σ and Q3 for selected percentage of missing values according to its position. As can be seen from Table 2 to 4, we could see for each percentage of missing values and orientation, the value of mean will be the smallest value followed by the value of Q3 and the largest value will be the mean +σ value. This is expected from the plot in Figure 2 where the minimum and maximum values gap show how these values will be arranged to substitute the missing value, we give an example of how to impute the missing values for 5% missing data that missing at P2 by using this method. By selecting the mean +σ as the imputation from Table   3, the new set of the missing values imputation will be as below, depending on the day the missing value starts and ends: ..., 64734, 64709, 65506, 65651, 63704, 50069, 44398, 64734, 64709, 65506, ...

RESULTS AND DISCUSSION
Tables 5 and 6 are the error measurement outcomes of the findings. Root Mean Square Error (RMSE) and Mean Absolute Error (MAE) are selected as the error measurements to observe the goodness-of-fit for these missing values study as it is the most widely used and theoretical relevance in statistical modelling (Hyndman & Koehler 2006). Apart from that, the RMSE is also more sensitive than other measures occasionally whilst the MAE is slightly smaller than RMSE and it is an easier statistic to understand compared to RMSE. It was also recommended by Willmott and Matsuura (Willmott & Matsuura 2005) that MAE is an explicit measure of average error magnitude.
Beside their assists in showing the robustness of the models, these tests could show the significant of the findings if the outcome support each other result. To observe the performance of the model approach, four models widely used in handling missing values of time series are compared. These include the linear model, cubic spline model, mean imputation and SARIMA forward and back propagation model.

Linear
Spline The DI1 provides a good substitution for missing values located at P1 and P2 whilst the DI3 gives a good imputation for missing values located at P3. This is acceptable for all percentages of missing values if refer to the placement of the missing values. Since the missing values in P1 and P2 are at the beginning and in the middle of the data, mean imputation is best to substitute the misses. The data do not increase rapidly through the time thus by taking the mean of the remaining data, it will provide rational values which are closer to the missing values.
Referring to the result in Tables 5 and 6, DI3 provides a good estimation when the missing values occur at the end of the data for all percentages of missing value. This is adequate with the pattern of the data where it has shown an increasing trend along the time which can be referred in Figure 1. A larger estimation from mean value will be appropriate for the misses at P3. And from Table 2 until Table 4, Q3 has a value which is higher than mean, therefore, Q3 will be appropriate to substitute the missing values in P3.
Other than that, the Q3 is more suitable to impute the missing value compare to mean+σ because if we refer to Table 2 until Table 4, mean+σ has larger difference with mean compare to Q3 and since the increment in the data trending is very little, Q3 is more appropriate for imputation compare to mean+σ.
Based on the results from the percentage of misses at 5%, 15%, and 25% for P1, the difference between the errors with other methods is rather large. Therefore, this study moved the misses to the middle of the data and observed that the difference of error between the methods, especially the proposed methods becomes smaller and closer to other methods. This is true as the missing values percentage become larger, the error will become larger too because the data used to impute the missing values will be smaller.
From the results in Tables 5 and 6, linear, spline, mean imputation, and SARIMA provide larger values of RMSE and MAE than the proposed technique. The reason for that is because methods such as linear and cubic spline interpolation are imputed from equations of certain models which assume that the data follow a certain pattern. Nevertheless, this only provides good imputation if the data follow the pattern. As for mean imputation, if the data fluctuate around the mean, the mean imputation provides reasonable imputation to the missing values.
For the SARIMA model, the process consists of identifying the order, parameter estimation and model checking. The process is lengthy, time-consuming and becomes more complex, as it occasionally involves forecasting and back forecasting particularly when the missing values are at the middle of the data. For this reason, imputation by SARIMA is less preferable than other methods. Furthermore, from the RMSE and MAE value in Tables 5 and 6, this method is occasionally inferior compared to mean imputation, a much simpler method.
CONCLUSION Missing values are a common issue in the actual database. Thus, a number of common techniques have been developed to deal with missing values. Most importantly, one must choose the appropriate method so that it is able to impute the missing values and the estimates are the closest to the actual one. The appropriate method may primarily depend on the type of data. Time series data often contain a certain pattern which is predictable. Imputing time series data can be relatively challenging due to the seasonality of the time series data. This study used load data to test the imputation technique to deal with missing values in a seasonal time series data.
The first step is by eliminated the seasonal period by rearranging the data into days. By removing the seasonality, the complexity of the data could be reduced and a simpler technique could be applied. Three imputations are selected for this purpose which is the mean, mean+σ and Q3 value. Each of these imputations is selected for its own benefit to encounter the missing values. These imputations have different value but close to each other. From mean, mean+σ to Q3 values, we can see how these values increased and gives the result of why DI1 and DI3 are suitable for specific orientation.
The orientation of the missing values in the data is also important when considering the imputation of the missing values. If the data shows a trend, then its imputation should also consider the trend factor. As can be concluded from this study, DI1 which used mean imputation provides the best estimation of the missing values if the missing values are at the beginning or in the middle of the data. However, DI3 which used the Q3 is proper for a missing value at the end of the data. This shows that the location of the missing values should be taken into consideration before imputing the missing values.
In conclusion, it is important for one to understand their data before applying a method. Although this method has longer steps, but it gives a lot of improvement in substituting the missing data with the imputations. By understand the data, the complexity of the data such as the seasonality and trend effects could be distinguished and a simpler method could be used to overcome the problem of missing values. On the other hand, the orientation of where the missing value lies in is also important. By recognising the placement of the missing values could help one to choose an appropriate method and could improve the imputations better.