# An ML-Based Solution in the Transformation towards a Sustainable Smart City
## 4 Results  
For the purpose of this study, we tested a number of machine learning automation environments. For the implementation, we chose ML in Visual Studio 2022 because of its large selection of algorithms, fast semi-automatic learning and testing, and the ability to download a file or API for further use within the SSC. Here is a brief description of the algorithms used:  
* LightGBM regression: A gradient boosting framework that uses tree-based learning algorithms. It is designed to be fast and efficient, especially for large data sets, and is known for its high performance and scalability. * FastTreeTweedie regression: A variant of the FastTree algorithm that models the Tweedie distribution, suitable for tasks such as insurance claims, where the target variable has both zero and positive continuous values. It combines decision tree learning with the Tweedie distribution to handle complex data distributions. * LbfgsPoisson regression: A regression algorithm that uses the limited-memory Broyden-Fletcher-Goldfarb-Shanno (LBFGS) optimization method to fit a Poisson distribution model. It is useful for numerical data where the output is a non-negative integer, such as the number of occurrences of an event. * FastTree Regression: A gradient-boosting algorithm that builds an ensemble of decision trees for regression tasks. It is designed for fast execution and can efficiently handle large data sets, making it suitable for high-dimensional data. * FastForest Regression: An ensemble method that combines multiple decision trees to increase predictive accuracy. It is a type of random forest algorithm that is particularly good at reducing overfitting and improving generalization in regression tasks. * SdcaRegression: Stochastic Dual Coordinate Ascent (SDCA) regression is an optimization-based method for linear regression tasks. It is well-suited for large-scale problems and achieves efficient, fast convergence by solving a dual original optimisation problem. For each data set 1-7, we tested 41-78 algorithms, selecting the best ones (algorithms 1-7) against the set criteria (high accuracy, low RMSE and short execution time). The best selected algorithms are shown in Figure 4.  
Algorithms 1-3 (Stage 1), considered best for analysing individual data, are shown in Figure 5. In the individual areas, the best algorithms were for  
* Health data: LightGbm Regression (0.8510) (Table 3);
* Energy consumption data: LbfgsPoissonRegression (0.7688) (Table 4);
* Traffic data: LightGbm Regression (0.8687) (Table 5). Figure 6: Cross-validation results between cascade of simple algorithms and deep learning. Important note: the LightGbm Regression algorithms for health data analysis and traffic data analysis are algorithms trained on different data; thus, they result in different models. Similarly, the LightGbm Regression algorithms used in Stage 1, Stage 2 and Stage 3 are different algorithms because we used different data sets for learning. Algorithms 4-6 (Stage 2), considered best for data aggregation, were from  
* Health data (algorithm 4): LightGbm Regression (0.8501);
* Energy consumption data (algorithm 5): LbfgsPoissonRegression (0.7597);
* Traffic data (algorithm 6): LightGbm Regression (0.8567). The algorithm considered best for cloud management (central/general view: algorithm 7, Stage 3) was  
* LightGbm Regression (0.8322). The selection of SSC areas to be modelled (health, energy and mobility) and the levels and modelling approaches seem correct, touching on the main current and partly future SSC problem areas and related ESG policies and reports. We considered all types of algorithms and networks, including traditional multilayer perceptron (MLP) when comparing algorithms in each area (health, energy management, traffic and transport). However, assuming a minimum accuracy threshold of 0.60, none of them achieved the required results in a reasonable time (they took too long to learn).