## 2 Materials and Methods
### ML Model Setting  
ML-based prediction models consist of four types of resources: dataset, training process, model, and prediction. The workflow was to use training data during the training process for model creation. This model with data input was used to establish the predictions. The activation functions were first employed for linear and nonlinear models to train an ML model, depending on the specific ML-based prediction models. Therefore, the ML was trained by using simple frameworks. The tweaking parameters as hyperparameter optimization were applied to improve the trained ML by adjusting model parameters to achieve the best results. In addition, for ML model construction, the feature selection method was necessary for identifying a subset of only relevant input variables to be used. The variable selection process was beneficial in reducing the overfitting and training time while improving accuracy [38]. In this study, we experimented based on two assumptions: (1) the electricity consumption prediction model is linear, the variables are of a normal distribution, and (2) there is non-linearity in the variables. Hence, we applied Multiple Regression (MR), Decision Tree (DT), and Support Vector Regression (SVR) to deal with linear and nonlinear functions. The above process was conducted in RapidMiner(r) Software in five steps (see Appendix A Figure A1). Step one: The basic processing is composed of three tasks, including (1) primary pre-processing data, which started from loading the dataset and performed some basic pre-processing tasks such as defining target columns, removing unnecessary columns, and unifying value types, and then filtering examples. (2) The next task was creating a training and validation set by splitting data into a 60:40 ratio for performance calculation. (3) Then, the essential feature engineering was applied to replace missing and infinite value. This also includes data encoding and removing columns with too many nominal values. Step two: The automatic feature selection and modeling. The feature selection was automatically performed to arrange and optimize the number of predictor variables used \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **Mean** &
\begin{tabular}{c} **STD.** \\ **Error** \\ \end{tabular} & **SD.** & **Min** & **Max** \\ \hline Total Electricity & & & & & \\ Consumption 1 (TEC) & 847.98 & 78.60 & 1054.48 & 6.73 & 4293.21 \\ Population (TP) & 75,633.17 & 5003.59 & 67,130.15 & 4580.00 & 294,682.00 \\ Household (TH) & 38,892.08 & 3224.76 & 43,264.70 & 1903.00 & 199,851.00 \\ Sum of Light 2 (SL) & 6682.55 & 674.82 & 9053.65 & 49.40 & 41,146.70 \\ Area of Lit 3 (AL) & 50.75 & 5.32 & 71.34 & - & 324.81 \\ Built up Area 3 (BU) & 79.51 & 4.92 & 66.05 & 1.74 & 264.27 \\ Population Density (PD) & 216.80 & 15.97 & 214.25 & 32.00 & 1130.00 \\ Area 3 & 445.46 & 21.79 & 292.34 & 7.07 & 1422.90 \\ Year & 2014.50 & 0.13 & 1.71 & 2012 & 2017 \\ Gross Domestic Product 4 (GDP) & 592,073.89 & 57,014.05 & 764,923.78 & 3265.83 & \(4.08\times 10^{6}\) \\ \hline \hline \end{tabular} Unit. 1 1 GWh; 2 1 nW cm-1 sr-1; 3  km2; 4 million Baht.  
\end{table} 
Table 1: Descriptive statistics of variables. by each model. This feature selection supports multi-objective feature selection and defends a balance correlation value between 1 and 0. The multi-objective evolutionary algorithm was operated to find the best feature sets to build models for the feature selection process. Each feature set was Pareto-optimal concerning complexity vs. model validation. The complexity was calculated based on the feature set where each feature in the set contributes complexity one. The selected feature sets were determined based on the optimal trade-offs between complexity and model errors. Afterward, we trained the models and applied automatic hyperparameter tuning (parameter optimization). Step three: The transform validation and scoring data were performed, preparing data for validation and the scoring process in the next step.