## 3 Methodology
### Micro Methodology
#### 3.2.3 Level 3: Machine Learning  
In order to answer RQ3.1, input features have been used from the dataset to predict values in upcoming years:  
* Time Series Regression: has been used since it can forecast a future response using the historical responses and dynamics transition from related predictors. Different models are applied in this study, including persistence models (using walk forward validation), autoregression models (using autoregression function by statsmodels), and optimized autoregression model (using walk-forward over time steps). These models are evaluated by Root Means Square Error (RMSE) value, which measures the differences between values predicted and the values observed.  
To define whether Machine Learning models can use vehicle specifications data to predict their fuel consumption and CO\({}_{2}\) emission (RQ3.2), different models are conducted in this study and classified into two groups: Machine Learning models to predict a variable from a variable; and models to predict a variable from multiple variables.  
For building Machine Learning models to estimate a variable from a single variable, data of engine size, number of cylinders, fuel consumption in a city and on a highway have been used to predict total fuel consumption and CO\({}_{2}\) emissions. Moreover, total fuel consumption and CO\({}_{2}\) emission data were used to predict each other. This research uses relevant methodologies to model relationships between those variables, which include:  
* Linear Regression: using the sklearn model and the dataset is split into training and testing sets with 80%:20% ratio;
* Univariate Polynomial Regression: using the sklearn model and 5 different degrees (from Degree 1 to Degree 5).  
Regarding Machine Learning models used for estimating a variable from multiple variables, groups of data, including group A (model year, engine size, and cylinders) and group B (engine size and cylinders) have been used to predict total fuel consumption and CO\({}_{2}\) emissions. Furthermore, data on fuel consumption in cities and highways were also used to estimate the total fuel consumption of vehicles. The applied models are listed as follows:* Multiple Linear Regression: using the sklearn model and the dataset is split into training and testing sets with 80%:20% ratio;
* Logarithmic Regression: using the sklearn model with log transformed predictor values and exponential transformed predictor values;
* Exponential Regression: the dataset is split into training and testing sets with 75%:25% ratio;
* Transformation of data: the dataset is split into training and testing sets with 75%:25% ratio;
* Multivariate Polynomial Regression: using the sklearn model and 5 different degrees (from Degree 1 to Degree 5).  
These models are chosen because many variables can be used at the same time to examine the statistical significance of each variable and transform them into independent variables. These forms of regression models also support the prediction of the dependent (or target) variables for later analysis [36]. In this paper, the coefficient of decision (R squared) value has been used to evaluate the above-mentioned models. The R squared value is a statistical measurement that examines how differences in one variable can be explained by differences in a second variable. Ranging from 0 to 1, the higher the R squared value, the better the model can be used for prediction.