# Evaluation of Turkey's Road-Based Greenhouse Gas Inventory and Future Projections
## 2 Materials and Methods
### Polynomial Regression  
Regression is a crucial topic in data mining that is used to predict a specific outcome by considering relevant input factors. The data-driven model is unsuitable for linear prediction in some engineering computations. When faced with such situations, employing a suitable curve for the given data is advisable. Polynomial regression is a widely used method for data analysis [39; 40]. It offers an advantage over linear models by providing high flexibility in modeling nonlinear data relationships. Thanks to its flexible structure, it can capture complex trends and shapes. Therefore, the model can fit the data better [41]. This method offers high accuracy in capturing nonlinear relationships and fitting curves, enabling the representation of more complex data relationships [42]. Polynomial regression using too much data may cause overfitting. In this case, the model may perfectly predict the data it was trained on but may fall short on new data. Additionally, outliers can seriously degrade the accuracy of the model. It is also important to determine the appropriate polynomial degree; lower degrees may be insufficient, while higher degrees may create unnecessary complexity. Therefore, these factors should be carefully considered when creating a model [42; 43].  
Polynomial regression, involving a single independent variable denoted as X, is a specific instance of multiple regression. The formula below represents the univariate polynomial regression model. K represents the degree of the polynomial. The degree of the polynomial is a parameter that quantifies the model's intricacy level. Effectively, this is equivalent to having a multi-model with the variables \(X_{1}=X\), \(X_{2}=X^{2}\), and \(X_{3}=X^{3}\), and its formula is expressed in Equation (5) [44].  
\[y_{i}=\beta_{0}+\beta_{1}x_{i}+\beta_{2}{x_{i}}^{2}+\beta_{3}{x_{i}}^{3}\ldots +\beta_{k}{x_{i}}^{k}+\varepsilon_{i}\text{, for }i=1,2,\ldots,n \tag{5}\]  
where y is the dependent variable, x is the independent variable, k is the polynomial degree, \(\beta_{0}\), \(\beta_{1}\), \(\ldots\), \(\beta_{k}\) are constant coefficients, and \(\varepsilon_{i}\) is the error between the model and the observations.  
The coefficient of uncertainty is calculated using Equation (6), where R\({}^{2}\) is the coefficient of uncertainty. This value is used to show the relationship between variables. The variable takes a value between 0 and 1 when calculated using the foregoing formula. The nearness of R\({}^{2}\) to 1 indicates good agreement between the values.  
\[R^{2}=\frac{S_{t}-S_{r}}{S_{t}} \tag{6}\]  
where \(S_{t}\) is the total sum of squares, and S\({}_{r}\) is the residual sum of squares [45].  
In this study, a quadratic polynomial regression model was developed to analyze historical trends and predict the future number of motor vehicles in Turkey. The dataset (1966-2021) was processed using Python and split into training (80%) and testing (20%) subsets. Model performance was evaluated using standard error metrics, particularly RMSE and MAE. RMSE, which penalizes larger errors more heavily, is suitable in contexts where large deviations are critical, whereas MAE provides a straightforward interpretation of the average prediction error in actual units (Equations (7) and (8)) [46].  
\[RMSE=\sqrt{\frac{1}{n}\sum_{i=1}^{n}(\ y_{i}-\hat{y}_{i})^{2}} \tag{7}\]  
\[MAE=\frac{1}{n}\sum_{i=1}^{n}\lvert y_{i}-\hat{y}_{i}\rvert \tag{8}\]  
where \(y_{i}\) is the true value, \(\hat{y}_{i}\) is the predicted value, n is the total number of observations.